-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EditBar improvement #599
Labels
Comments
Viglino
added a commit
that referenced
this issue
May 3, 2021
💡 Great idea... this was missing! 👍 var mySubBar = new ol.control.Bar()
// Add a sub-bar to the Transform button
editBar.getControlsByName('Transform')[0].setSubBar(mySubBar); The name is the one of the interaction: var ctrl = editBar.getControlsByName('Transform')[0];
var inter = edit.getInteraction('Transform');
// For draw interaction : DrawPoint, DrawLine, DrawPolygon, DrawRegular
var ctrl = editBar.getControlsByName('DrawPolygon')[0];
var inter = edit.getInteraction('DrawPolygon'); |
That's a great notice! Thanks. |
It's a typo 😞 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is meaningful to use
CopyPaste
interaction with theTransform
control (and interaction) as explained in http://viglino.github.io/ol-ext/examples/bar/map.control.editbar.html example.So it could be useful to add
Cut
,Copy
andPaste
buttons to aBar
(subbar) activated when theTransform
control is activated (as it happens inSelect
control in theEditBar
).The request is to add a way to do that.
The proposal is:
EditBar
, so it could possible to get them later usinggetControlByName
function;setSubBar
function to Toggle control, in order to add (or remove) a bar in control (now it is possible only in constructor)The text was updated successfully, but these errors were encountered: