-
Notifications
You must be signed in to change notification settings - Fork 799
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
Add setZIndex function #1084
Add setZIndex function #1084
Conversation
增加了手动设置和自动设置图层 zIndex 值的方法。 在初始化设置了 position 参数时,自动设置图层 zIndex 值(遍历所在 pane 里的所有图层,设置最大(front)或最小(back)值)。 在初始化设置了 zIndex 参数时,position 参数的默认值失效,直接使用该值作为图层zIndex值。 如果之后手动调用 bringToFront 或 bringToBack 方法,之前手动设置的zIndex失效,自动分配图层 zIndex 值。 -----------------------------渣翻译分割线-------------------------- if set position option, it will auto set the image dom zIndex. (go through all other layers of the same pane, set zIndex to max + 1 (front) or min - 1 (back)) if set zIndex option, it will use the value as the image dom zIndex. if call bringToFront / bringToBack function, though set zIndex option in initialize, it will auto set the image dom zIndex.
thank you for this @appleshowc! my gut reaction is that it is preferable to use the map pane functionality that is present in Leaflet itself instead of relying on let me know if that's not feasible for some reason. |
Thanks for replay! |
thanks for taking the time to explain in more detail and my apologies for delay in responding. i'd be interested in testing this new feature and hopefully getting it landed. can you resolve the lint errors travis is reporting so that the CI tool can get past that step and run our actual test suite? |
Solve Travis CI error
we can blame #1038 for that. there is nothing that would make me happier than learning how to fix that particular problem. i restarted the build (twice) and i'm seeing green now. |
it took me way longer than it should have to pull down this code and take a close look at it. thanks for your patience! its a great patch. |
Add setZIndex function to dynamic/imageMapLayer
增加了手动设置和自动设置图层 zIndex 值的方法。
在初始化设置了 position 参数时,自动设置图层 zIndex 值(遍历所在 pane 里的所有图层,设置最大(front)或最小(back)值)。
在初始化设置了 zIndex 参数时,position 参数的默认值失效,直接使用该值作为图层zIndex值。
如果之后手动调用 bringToFront 或 bringToBack 方法,之前手动设置的zIndex失效,自动分配图层 zIndex 值。
-----------------------------渣翻译分割线--------------------------
if set position option, it will auto set the image dom zIndex. (go through all other layers of the same pane, set zIndex to max + 1 (front) or min - 1 (back))
if set zIndex option, it will use the value as the image dom zIndex.
if call bringToFront / bringToBack function, though set zIndex option in initialize, it will auto set the image dom zIndex.