Allow for adding plugins
See original GitHub issueThe core of the library is now nearly feature complete, so to keep the size reasonable, we’ll think twice before adding new features to the core.
But sometimes additional features will be useful to a subset of users. To allow for sharing the code for these kinds of features, we need to refactor to make it easy to add plugins. Then we can freely add unlimited new features as plugins while keeping the core of the library as small as possible.
Work in progress
- Namespace methods calls
- Events
- Add events hooks
- Make events modifiable
- Update library to trigger all events
- Documentation with events listing
- Documentation on how to use them
- Tests (#17)
- Plugins
- Add plugins system
- Plugins load order
- Pass options into plugins
- Tests
- Documentation (how to use, listing, building your own plugin)
- Separate tests for each plugin
- Move click/touch/pointer events into a plugin
- Move
center
,contain
andfit
into a plugin - Move controls into a plugin
- Move pan limit into a plugin (#37)
- Move min/max zoom into a plugin
- Move enable/disable pan into a plugin
- Move enable/disable zoom into a plugin
- Move double click into a plugin
- Move mouse wheel scroll into a plugin
- Allow building momentum/inertia plugins (as in #117 and #174)
- Add right click plugin (as in #87)
- Move thumbnail viewer/navigator into a plugin (#110)
- Add Change mouse cursor when panning into a plugin (#154)
- Move rotation into a plugin (#169)
- Separate zoom for X and Y axis (#176)
- Join beforePan/beforeZoom and onPan/onZoom into one event beforeChange/onChange that will contain both zoom and pan data
- Remove
customEventsHandler
- Update demos
- On actual CTM update fire
render
event (#121)
@bumbu and @dlg-yahoo, are there other things needed to make it easy to add plugins? It might be awhile before I have time to do this myself, so don’t let me be the bottleneck if either of you want to tackle this sooner. I’m fine with whatever you prefer, @bumbu.
Issue Analytics
- State:
- Created 9 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
How do I enable add plugins in WordPress? - website builder
To enable add plugins in WordPress, head over to the Plugins page in your WordPress dashboard and click on the Add New button....
Read more >not allowed to install plugins on my site - WordPress.org
I am the admin and have all rights, yet somehow not the right to install plugins… The plugin option is also not shown...
Read more >Why Can't I Add or Install Plugins in WordPress? - WPBeginner
We hope this article helped you learn why you can't add or install plugins in WordPress. You may also want to see our...
Read more >How to Install, Add, and Use WordPress Plugins - HubSpot Blog
The simplest way to add plugins is by searching for your desired plugin in your WordPress dashboard and installing with a click. The...
Read more >What is a plugin? How do I install it?
A plugin is a piece of software that acts as an add-on to a web browser and gives the browser additional functionality. Plugins...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m hoping to find some time at some point here, but it is a big task for a free side project! If I have the chance to dig into this, I’ll let you know.
Hey @ariutta,
Regarding animation: I agree that ideally the library would provide the bare minimum (aka pan and zoom) and animations would come as an add-on/extension.
As for the future versions ideally we’d want as you mentioned to provide the core/basic manipulations with ability to extend/hook into them with plugins/add-ons. We could bundle them in different versions or provide instructions how to build different bundles but based on current state of JavaScript - most projects have their own bundlers and we’d only need to provide the source.
Not sure thought that we want to support the SVG script tag as it feels like an edge case which can be covered by simply embeding the SVG into an HTML page.
But starting with a plugin system would be a great start and based on the usage of that it should be easy to see what people need the most (plus we have a ton of suggestions in issues 😃.
As you can see from this thread I started building the plugin system at some point, but never finished it, and I don’t have time to do it any time soon. But if anyone wants to work on that then I’d be definitely open to help.