Comments (4)
Hi Alex,
I can add the functionality, but time is sparse. So it would in the next release, say first quarter of 2018. Do you have any additional suggestions?
Thanks in advance
from leaflet.selectareafeature.
Hi, I certainly understand about limited time! Yes I did have another suggestion: I had to add a custom hook to the end of the _doMouseUp function, so I could trigger some code to disable further shape selection and also run some other housekeeping functions within the application.
Some details on the use case should make the reason for doing this clearer: when the user ctrl-clicks on the map, it enables your plugin to allow the drawing of a one-time region. Once the region is drawn, then the drawing mode automatically disables (selectfeature.disable called) until the user does another ctrl-click to begin a new selection.
I think this highlights the potential utility of adding some call-back hooks at the end of the various mouse events you're consuming: MouseUp and MouseDown would seem to be the most useful.
Perhaps something like this could be invoked to register custom hook functions to be called:
selectfeature.eventRegister({
onMouseUp: <custom function #1>,
onMouseDown: <custom function #2>
});
To unregister a custom function, passing in a null could work. Anyway, it's just a post implementation thought to consider..
Many thanks
-Alex
from leaflet.selectareafeature.
Hi Alex, about the features you describe to use predefined shapes, maybe I could trigger you to contribute to the project if you like.
from leaflet.selectareafeature.
I think a free shape to select objects is more convinient.
Closing this issue
from leaflet.selectareafeature.
Related Issues (8)
- (Question) How to make SelectAreaFeature to work with Leaflet.ContextMenu HOT 2
- Use Leaflet's Events to fire an event when features might be selected HOT 2
- Events and better match algorithm HOT 4
- Single click bug and PR HOT 4
- Leaflet tiles flashes and being selected while drawing to select HOT 2
- Selected Areas Remain Upon Map Reload HOT 1
- Mouse up error with Leaflet 1.8 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leaflet.selectareafeature.