diff --git a/src/js/tool/application/RectangleTool/usecase/RectangleToolDrawRectPointerUpEventUseCase.ts b/src/js/tool/application/RectangleTool/usecase/RectangleToolDrawRectPointerUpEventUseCase.ts index 0c965c48..132a82de 100644 --- a/src/js/tool/application/RectangleTool/usecase/RectangleToolDrawRectPointerUpEventUseCase.ts +++ b/src/js/tool/application/RectangleTool/usecase/RectangleToolDrawRectPointerUpEventUseCase.ts @@ -76,10 +76,7 @@ export const execute = async (event: PointerEvent): Promise => // 新規Shapeをライブラリに追加 const path = `Shape_${workSpace.nextLibraryId}`; const externalLibrary = new ExternalLibrary(workSpace); - externalLibrary.addNewShape(path); - - // ライブラリからShapeを取得 - const shape: ExternalInstanceImpl = externalLibrary.getItem(path); + const shape = externalLibrary.addNewShape(path); if (!shape) { return ; } diff --git a/src/js/tool/application/RoundRectTool/usecase/RoundRectToolDrawRectPointerUpEventUseCase.ts b/src/js/tool/application/RoundRectTool/usecase/RoundRectToolDrawRectPointerUpEventUseCase.ts index c5fdb2a8..27f7bd10 100644 --- a/src/js/tool/application/RoundRectTool/usecase/RoundRectToolDrawRectPointerUpEventUseCase.ts +++ b/src/js/tool/application/RoundRectTool/usecase/RoundRectToolDrawRectPointerUpEventUseCase.ts @@ -76,10 +76,7 @@ export const execute = async (event: PointerEvent): Promise => // 新規Shapeをライブラリに追加 const path = `Shape_${workSpace.nextLibraryId}`; const externalLibrary = new ExternalLibrary(workSpace); - externalLibrary.addNewShape(path); - - // ライブラリからShapeを取得 - const shape: ExternalInstanceImpl = externalLibrary.getItem(path); + const shape = externalLibrary.addNewShape(path); if (!shape) { return ; } diff --git a/src/js/tool/application/TextTool/usecase/TextToolDrawRectPointerUpEventUseCase.ts b/src/js/tool/application/TextTool/usecase/TextToolDrawRectPointerUpEventUseCase.ts index ad7a64c3..8a092e94 100644 --- a/src/js/tool/application/TextTool/usecase/TextToolDrawRectPointerUpEventUseCase.ts +++ b/src/js/tool/application/TextTool/usecase/TextToolDrawRectPointerUpEventUseCase.ts @@ -6,6 +6,8 @@ import { execute as textToolDrawRectPointerMoveEventUseCase } from "./TextToolDr import { $SCREEN_DRAW_TEXT_ID } from "@/config/ScreenConfig"; import { $getDefaultTool, $setActiveTool } from "../../ToolUtil"; import { $TOOL_ARROW_NAME } from "@/config/ToolConfig"; +import { $getScrollLimitY } from "@/timeline/application/TimelineUtil"; +import { $getScreenOffsetLeft, $getScreenOffsetTop } from "@/global/GlobalUtil"; /** * @description 描画の範囲選択のマウスアップイベント @@ -63,5 +65,9 @@ export const execute = async (event: PointerEvent): Promise => // 範囲選択を非表示に textRectHideService(); - console.log("left: ", left, "top: ", top); + // 配置先を計算 + const x = left - $getScreenOffsetLeft(); + const y = top - $getScreenOffsetTop(); + + console.log(x, $getScrollLimitY); }; \ No newline at end of file