#16787 closed feature (fixed)
[cla] Proposal: Image Loader Module for Dojo 1.9
Reported by: | Brandon Payton | Owned by: | dylan |
---|---|---|---|
Priority: | undecided | Milestone: | 2.0 |
Component: | Loader | Version: | 1.9.0a2 |
Keywords: | Cc: | Kitson Kelly | |
Blocked By: | Blocking: |
Description
I have needed to dynamically load images in multiple projects and scenarios over the last year, and while it is not difficult to occasionally write a small module that does just what I need, this seems like something that would be useful in the toolkit.
Because Dojo 2.0 is slated for 2014, I'm proposing this for the 1.9 release.
I have attached a zip file containing the proposed module. If you prefer, you can clone the repository:
git clone --recursive https://github.com/brandonpayton/dojo-image-loader.git
One comment on the choice of API: I placed the optional options argument first in the function signatures to allow easier creation of partial functions; though, as I write this, I realize it's not hard to wrap the image loader function if the imageLoad() argument order was reversed.
Any feedback is appreciated.
If there is interest, please let me know how to contribute the code to the foundation.
Thanks!
Attachments (1)
Change History (8)
Changed 8 years ago by
Attachment: | dojo-image-loader.zip added |
---|
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
Cc: | Kitson Kelly added |
---|---|
Owner: | set to dylan |
Status: | new → assigned |
One of you guys should process this ticket; I know you've been closing most enhancement requests telling people to put their code in github. Except, this code is already in github.
comment:3 Changed 8 years ago by
Component: | General → Loader |
---|
I think it's an interesting enough loader plugin to consider making it available as part of Dojo. That said, I'm not sure I'm in the majority in seeing the usefulness of it. I'll discuss with others.
comment:4 Changed 8 years ago by
This submission isn't a loader plugin, just a standalone loader, but it would be ~3 lines of code to make it a plugin.
I left it out because I knew Kitson wasn't a fan and because it seemed like it could cause loader timeouts if used with larger images or a slow connection.
I'm up for making it a plugin if that is the consensus.
comment:5 Changed 8 years ago by
Milestone: | tbd → 2.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
brandonp, given that it's in github, and the plan is to move most things like this to github for Dojo 2, I think the best plan for now would be to register it as a package at http://packages.dojofoundation.org/
While this won't get as much publicity as including it in 1.9, I plan to write up a section of the 1.9 announcement highlighting the many great new packages people can use with Dojo.
Please bug me to make sure I don't forget this.
comment:6 Changed 8 years ago by
Thanks, Dylan. I just noticed that you had responded.
That sounds great if it's not already too late. I'll convert this to a real package and let you know.
comment:7 Changed 8 years ago by
I've converted it to a standalone package and changed the project name. The new URL is: https://github.com/brandonpayton/image-load
I have also registered it as a package at http://packages.dojofoundation.org/
Thanks!
Here are some examples of the proposed API: