@c4h/chuci 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -325,7 +325,11 @@ export class CcViewer3DModel extends CcViewerBase {
|
|
|
325
325
|
canvas.style.width = `${rect.width}px`
|
|
326
326
|
canvas.style.height = `${rect.height}px`
|
|
327
327
|
canvas.style.pointerEvents = 'auto'
|
|
328
|
-
|
|
328
|
+
// Get z-index from host style
|
|
329
|
+
const hostStyle = window.getComputedStyle(this)
|
|
330
|
+
const zIndexVar = hostStyle.getPropertyValue('--cc-viewer-z-index-each').trim()
|
|
331
|
+
const baseZIndex = zIndexVar ? parseInt(zIndexVar, 10) : 1000
|
|
332
|
+
canvas.style.zIndex = `${baseZIndex + 1}`
|
|
329
333
|
document.body.appendChild(canvas)
|
|
330
334
|
|
|
331
335
|
// Store canvas reference for cleanup
|
|
@@ -276,7 +276,11 @@ ${this.getTargetDebugInfo()}
|
|
|
276
276
|
normalCanvas.style.left = `${rect.left}px`
|
|
277
277
|
normalCanvas.style.width = `${rect.width}px`
|
|
278
278
|
normalCanvas.style.height = `${rect.height}px`
|
|
279
|
-
|
|
279
|
+
// Get z-index from host style
|
|
280
|
+
const hostStyle = window.getComputedStyle(this)
|
|
281
|
+
const zIndexVar = hostStyle.getPropertyValue('--cc-viewer-z-index-each').trim()
|
|
282
|
+
const baseZIndex = zIndexVar ? parseInt(zIndexVar, 10) : 1000
|
|
283
|
+
normalCanvas.style.zIndex = `${baseZIndex + 1}` // Above backdrop but below buttons
|
|
280
284
|
normalCanvas.style.pointerEvents = 'auto' // Keep mouse events for 3D controls
|
|
281
285
|
normalCanvas.style.display = 'block'
|
|
282
286
|
normalCanvas.style.background = 'transparent'
|