Skip to content

Commit

Permalink
#147 feat: 不要な処理を整理
Browse files Browse the repository at this point in the history
  • Loading branch information
ienaga committed Jul 20, 2024
1 parent 24b68f0 commit 358393c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ export const execute = async (event: PointerEvent): Promise<void> =>
// 新規Shapeをライブラリに追加
const path = `Shape_${workSpace.nextLibraryId}`;
const externalLibrary = new ExternalLibrary(workSpace);
externalLibrary.addNewShape(path);

// ライブラリからShapeを取得
const shape: ExternalInstanceImpl<ExternalShape> = externalLibrary.getItem(path);
const shape = externalLibrary.addNewShape(path);
if (!shape) {
return ;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ export const execute = async (event: PointerEvent): Promise<void> =>
// 新規Shapeをライブラリに追加
const path = `Shape_${workSpace.nextLibraryId}`;
const externalLibrary = new ExternalLibrary(workSpace);
externalLibrary.addNewShape(path);

// ライブラリからShapeを取得
const shape: ExternalInstanceImpl<ExternalShape> = externalLibrary.getItem(path);
const shape = externalLibrary.addNewShape(path);
if (!shape) {
return ;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 描画の範囲選択のマウスアップイベント
Expand Down Expand Up @@ -63,5 +65,9 @@ export const execute = async (event: PointerEvent): Promise<void> =>
// 範囲選択を非表示に
textRectHideService();

console.log("left: ", left, "top: ", top);
// 配置先を計算
const x = left - $getScreenOffsetLeft();
const y = top - $getScreenOffsetTop();

Check warning on line 70 in src/js/tool/application/TextTool/usecase/TextToolDrawRectPointerUpEventUseCase.ts

View workflow job for this annotation

GitHub Actions / windows-browser-test

'y' is assigned a value but never used. Allowed unused vars must match /^_/u

console.log(x, $getScrollLimitY);
};

0 comments on commit 358393c

Please sign in to comment.