| 106 | } |
| 107 | |
| 108 | private parseInteractiveObjectsLayer(layer: any): void { |
| 109 | for (const obj of layer.objects) { |
| 110 | const props: any[] = obj.properties || []; |
| 111 | const objectId = props.find((p: any) => p.name === "objectId")?.value; |
| 112 | if (!objectId) continue; |
| 113 | this.interactiveObjects.set(objectId, { |
| 114 | objectId, |
| 115 | name: obj.name || objectId, |
| 116 | x: obj.x, |
| 117 | y: obj.y, |
| 118 | width: obj.width || 0, |
| 119 | height: obj.height || 0, |
| 120 | }); |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | pixelToGrid(px: number, py: number): { gx: number; gy: number } { |
| 125 | return { |