From 957d4f9e03a3f0449fddd575fec95855bd3efba0 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Tue, 21 Apr 2026 17:06:53 +0200 Subject: [PATCH] . --- module/canvas/placeables/regionLayer.mjs | 4 +--- module/documents/chatMessage.mjs | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/module/canvas/placeables/regionLayer.mjs b/module/canvas/placeables/regionLayer.mjs index 2549d606..bbd78ef1 100644 --- a/module/canvas/placeables/regionLayer.mjs +++ b/module/canvas/placeables/regionLayer.mjs @@ -122,10 +122,8 @@ export default class DhRegionLayer extends foundry.canvas.layers.RegionLayer { const shapeWidth = type === line.id ? 5 * dimensionConstant : type === rectangle.id ? length : undefined; const shapeType = type === inFront.id ? cone.id : type; - const { width, height } = game.canvas.scene.dimensions; return { - x: width / 2, - y: height / 2, + ...canvas.mousePosition, base: { type: 'token', x: 0, diff --git a/module/documents/chatMessage.mjs b/module/documents/chatMessage.mjs index 6f3080f4..29ff613b 100644 --- a/module/documents/chatMessage.mjs +++ b/module/documents/chatMessage.mjs @@ -284,13 +284,12 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage { if (this.system.action.area.length === 1) createArea(this.system.action.area[0]); else if (this.system.action.area.length > 1) { - /* Pop a selection. Possibly a context menu? */ new foundry.applications.ux.ContextMenu.implementation( event.target, '.action-areas', this.system.action.area.map((area, index) => ({ - name: area.name, - callback: () => createArea(this.system.action.area[index]) + label: area.name, + onClick: () => createArea(this.system.action.area[index]) })), { jQuery: false,