@c4h/chuci 0.2.2 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4h/chuci",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Standalone multimedia swiper and viewer web components",
5
5
  "type": "module",
6
6
  "private": false,
@@ -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
- canvas.style.zIndex = 'calc(var(--cc-viewer-z-index-each, 1000) + 1)'
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
- normalCanvas.style.zIndex = 'calc(var(--cc-viewer-z-index-each, 1000) + 1)' // Above backdrop but below buttons
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'