adds StackingOrder module to project, to manage different layers/stackingContexts in the dom#434
adds StackingOrder module to project, to manage different layers/stackingContexts in the dom#434
Conversation
… it at the center not the cursor
fix addToolAtScreenCenter when you tap on a tool button
…nce needs improvement
…me to be considered the same
…ene nodes are updated through realtime channel using node public data (see updateObjectFromRawPose).
Analytics UI, AnalyticsLenses, and refactoring
…rmance Performance improvements for history spaghetti generation
Made Analyzer Settings UI less dependent on other UI elements
…reenCenter-fix Updated addToolAtScreenCenter() to work with the new off-center camera system.
Works in conjunction with the new PR in remote-operator-addon
…SC-key-fix Remote operator fly mode esc key fix
…ick on icons while the tools is open
… 3d tool is open; fullscreen2d tools stay in front
Allow clicking on icons while drawing is open
… z-index of full2D when multiple opened in a row
…bug-fix Fixed iOS add tool when spatial cursor outside of AreaTarget mesh bug
smaller minimized icons; callbacks for full2D toggled; more robust z-index of full2D tools
Ru tool icon adjustments
if a toolId is present in the URL, attempts to open the envelope when it loads
…kingContexts in the dom
|
I think this is a good start! Taking a look at https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context this feels like a pretty ideal approach |
|
I was planning to move the tools' iframes to different parent elements when they open/close to adjust which stacking context they belong to (moving chat to foreground, drawing tool to background, keeping tool icons in the middle). But this has run into an unexpected issue. It seems there is no way to prevent an iframe from reloading when it is appended to a different part of the DOM tree (https://stackoverflow.com/a/39895407). So when I tap on the chat icon, opening it fullscreen, and then move it to the foreground layer, the iframe reloads and it reverts back to its initial icon state. |
30939ce to
14870a2
Compare
I didn't manage to finish this up and get to the point where it actually fixes the issue of the drawing app's z-index on Safari, but I've put into place the beginnings of a system to better manage the stacking order of the application.
The stackingOrder creates a number of different layers in the app (background / scene / GUI, with more granularity), and all HTML elements that were added directly to the body are now assigned (and appended, instead) to one of these layers.
By giving each stacking layer a z-index, it establishes a separate stacking context for each layer, so that an element in a lower layer (theoretically) could never render above an element from a higher layer, and vice-versa.
Some more work may be needed to update the CSS for the various elements that are now part of these layers, or eliminate now-redundant/unnecessary CSS for some elements.
Additionally, I still want to move the tools from the GUI element in the
SCENE_APP_ICONS_AND_WIDGETSto either theSCENE_APP_BACKGROUNDor theGUI_APP_FOREGROUNDdepending on if they open in fullscreenFull2D mode or not (chat app would go to foreground layer, drawing app would go to background layer). This should fix the issue in safari where the drawing needs to be sandwiched above the scan but below the icons, while the chat app is above everything.