Leaflet.DistortableImage icon indicating copy to clipboard operation
Leaflet.DistortableImage copied to clipboard

Discussion about the role of the toolbar for LDI

Open sashadev-sky opened this issue 5 years ago • 5 comments

One idea is eventually this library will be written with custom toolbars in mind - this is how we plan on using it downstream ourselves in MK. So when we get to this point, we can perhaps change the default to no toolbar and swap out suppressToolbar: true with something like includeToolbar: true.

sashadev-sky avatar Jul 04 '19 06:07 sashadev-sky

@jywarren

sashadev-sky avatar Jul 04 '19 06:07 sashadev-sky

Ah, this sounds like a good idea. Thanks!

Someday, do you see DistortableCollection becoming its own separate library? Or is it too intertwined with LDI?

jywarren avatar Jul 05 '19 16:07 jywarren

@jywarren I dont know. It could be separated out but it's hard for me to picture the implementation details right now.

sashadev-sky avatar Jul 08 '19 23:07 sashadev-sky

@jywarren I fixed the suppressToolbar bug and just renamed the issue because it has some good discussion points in it.

Ah, this sounds like a good idea. Thanks!

Someday, do you see DistortableCollection becoming its own separate library? Or is it too intertwined with LDI?

Reading this again now, I was thinking that we were going to merge single and multi image interface so that there is always a collectionGroup. It can just do a check for number of images and disable automatically if there is only 1. That would be my final restructuring idea for version 1. I don't think there is any reason to keep them apart as two interfaces with different setup sections?

On the other hand, I understand plugins are meant to do "1 main thing". Looking at other Leaflet plugins, they all focus on one small goal, like making a toolbar, or a button. So say we did break out the collection as its own plugin (in future after it can do a bit more than now). An idea for it is it could be a general omniscient parent layer, that handles grouping and ungrouping logic for you based on extensible logic (and has group translating, rotating, etc. functionality).

Would love to know your thoughts!

And last question - is there something inherently wrong with building leaflet plugins that rely on other leaflet plugins as a dependency? Totally open ended question just trying to figure out how the plugin ecosystem works. For ex. would we end up breaking out things like keymapper as well? and then re-adding them as a dependency?

sashadev-sky avatar Aug 29 '19 20:08 sashadev-sky

@rexagod

sashadev-sky avatar Aug 29 '19 20:08 sashadev-sky