-
Notifications
You must be signed in to change notification settings - Fork 16
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
mapml-viewer controls attribute/property does not work as an API #758
Conversation
Added support for controlslist attribute, which is now represented by a DomTokenList Decustructed the setControls function to 2 seperate functions: setupControls() - creates the controls and setControls() - which sets the controls visibility using the hidden attribute based on the map's control and controllist attribute Modified old test to change from looking for deleted controls to now looking for the hidden controls Added Dom API tests Removed duplicate test files (domApi.test.js + domApi.html) TODO - create a DomTokenList class for controlslist?
Added a relatively big commit 9717c44 to reimplement setControls(), which now allows the controls and controlslist API to function properly, Changes made:
|
…efault size and some controls get cut off
f360179 - Added DomTokenList for the map's Few notes/questions:
|
…supported by jshint
to use that in mapml-viewer not quite working for reasons not yet clear. Discardable code fwiw
Clean up white space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments
Change attributeChangedCallback for controls, remove set/getAttribute
LGTM, merge when you're happy with it. |
document.createElement("mapml-viewer")
fails #673viewer = document.createElement("map", {is:"web-map"})
viewer.setAttribute("is","web-map")
_changeWidth
and_changeHeight
are causing errors in the console now (on web-map, same thing with mapml-viewer, when map created with width and height attributes it throws an error), as the _container does not get created in the constructor anymore, and is generated afterwards in the connectedcallbackcloses #675