Skip to content

Commit

Permalink
#147 ディレクトリ構成を変更
Browse files Browse the repository at this point in the history
  • Loading branch information
ienaga committed Oct 17, 2023
1 parent ab0767c commit a2f5747
Show file tree
Hide file tree
Showing 56 changed files with 111 additions and 111 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $LIBRARY_PREVIEW_AREA_ID } from "../../../config/LibraryConfig";
import { $LIBRARY_PREVIEW_AREA_ID } from "../../../../config/LibraryConfig";

/**
* @description ライブラリのプレビューエリアの背景色を更新
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Stage } from "../../../core/domain/model/Stage";
import { Stage } from "../../../../core/domain/model/Stage";
import {
$STAGE_BG_COLOR_ID,
$STAGE_FPS_ID,
$STAGE_HEIGHT_ID,
$STAGE_LOCK_ID,
$STAGE_WIDTH_ID
} from "../../../config/StageSettingConfig";
} from "../../../../config/StageSettingConfig";

/**
* @description ステージ設定の各値を更新
Expand Down
6 changes: 3 additions & 3 deletions src/js/core/application/usecase/StageInitializeUseCase.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Stage } from "../../domain/model/Stage";
import { execute as stageChageStyleService } from "../service/StageChageStyleService";
import { execute as screenScaleResetService } from "../../../screen/application/service/ScreenScaleResetService";
import { execute as libraryPreviewAreaChangeColorService } from "../../../controller/application/service/LibraryPreviewAreaChangeColorService";
import { execute as stageSettingUpdateService } from "../../../controller/application/service/StageSettingUpdateService";
import { execute as timelineLabelNameUpdateService } from "../../../timeline/application/service/TimelineLabelNameUpdateService";
import { execute as libraryPreviewAreaChangeColorService } from "../../../controller/application/LibraryPreviewArea/service/LibraryPreviewAreaChangeColorService";
import { execute as stageSettingUpdateService } from "../../../controller/application/StageSetting/service/StageSettingUpdateService";
import { execute as timelineLabelNameUpdateService } from "../../../timeline/application/TimelineLabelName/service/TimelineLabelNameUpdateService";
import { execute as screenStageAreaUpdateSizeService } from "../../../screen/application/service/ScreenStageAreaUpdateSizeService";
import { execute as screenStagePositionCenterService } from "../../../screen/application/service/ScreenStagePositionCenterService";
import { execute as screenStageOffsetUpdateService } from "../../../screen/application/service/ScreenStageOffsetUpdateService";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { $USER_SHORTCUT_SETTING_ID } from "../../../../config/UserSettingConfig";
import { EventType } from "../../../../tool/domain/event/EventType";
import { execute as userSettingMenuShortcutSettingMouseDownEventUseCase } from "../usecase/UserSettingMenuShortcutSettingMouseDownEventUseCase";
import { execute as userSettingMenuShortcutSettingMouseDownEventUseCase } from "./UserSettingMenuShortcutSettingMouseDownEventUseCase";

/**
* @description 書き出しフォーマットの初期起動ユースケース
Expand Down
2 changes: 1 addition & 1 deletion src/js/menu/domain/model/UserSettingMenu.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { $USER_MENU_NAME } from "../../../config/MenuConfig";
import { BaseMenu } from "./BaseMenu";
import { execute as userSettingMenuInitializeUseCase } from "../../application/UserSetting/usecase/UserSettingMenuInitializeUseCase";
import { execute as userSettingMenuInitializeUseCase } from "../../application/UserSettingMenu/usecase/UserSettingMenuInitializeUseCase";

/**
* @description ユーザー設定メニュークラス
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $TIMELINE_LABEL_NAME } from "../../../config/TimelineConfig";
import { $TIMELINE_LABEL_NAME } from "../../../../config/TimelineConfig";

/**
* @description タイムラインのラベルの値を更新
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ToolImpl } from "../../../interface/ToolImpl";
import type { ArrowTool } from "../../domain/model/ArrowTool";
import { $setActiveTool } from "../Tool";
import type { ToolImpl } from "../../../../interface/ToolImpl";
import type { ArrowTool } from "../../../domain/model/ArrowTool";
import { $setActiveTool } from "../../Tool";

/**
* @description アローツールの初期起動ユースケース
Expand Down
2 changes: 1 addition & 1 deletion src/js/tool/application/Initialize.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import { execute as toolInitializeUseCase } from "../application/usecase/ToolInitializeUseCase";
import { execute as toolInitializeUseCase } from "./ToolArea/usecase/ToolAreaInitializeUseCase";

/**
* @description ツールエリアの初期起動関数
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { $TOOL_ARROW_NAME, $TOOL_PREFIX } from "../../../config/ToolConfig";
import { ArrowTool } from "../../domain/model/ArrowTool";
import { $getDefaultTool } from "../Tool";
import { execute } from "./ToolInitializeBootService";
import { $TOOL_ARROW_NAME, $TOOL_PREFIX } from "../../../../config/ToolConfig";
import { ArrowTool } from "../../../domain/model/ArrowTool";
import { $getDefaultTool } from "../../Tool";
import { execute } from "./ToolAreaInitializeBootService";

describe("ToolInitializeBootServiceTest", () =>
describe("ToolAreaInitializeBootServiceTest", () =>
{
test("execute test", async () =>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { ToolImpl } from "../../../../interface/ToolImpl";
import { ArrowTool } from "../../../domain/model/ArrowTool";
import { FreeTransformTool } from "../../../domain/model/FreeTransformTool";
import { BucketTool } from "../../../domain/model/BucketTool";
import { CircleTool } from "../../../domain/model/CircleTool";
import { HandTool } from "../../../domain/model/HandTool";
import { PenTool } from "../../../domain/model/PenTool";
import { RectangleTool } from "../../../domain/model/RectangleTool";
import { RoundRectTool } from "../../../domain/model/RoundRectTool";
import { TextTool } from "../../../domain/model/TextTool";
import { ShapeTransformTool } from "../../../domain/model/ShapeTransformTool";
import { ZoomPlusTool } from "../../../domain/model/ZoomPlusTool";
import { ZoomMinusTool } from "../../../domain/model/ZoomMinusTool";
import { SaveTool } from "../../../domain/model/SaveTool";
import { LoadTool } from "../../../domain/model/LoadTool";
import { ExportTool } from "../../../domain/model/ExportTool";
import { UserSettingTool } from "../../../domain/model/UserSettingTool";

/**
* @description 各種ツールを起動
* Launch various tools
*
* @return {Promise}
* @method
* @public
*/
export const execute = (): Promise<void[]> =>
{
const tools: ToolImpl<any>[] = [
ArrowTool,
FreeTransformTool,
BucketTool,
CircleTool,
HandTool,
PenTool,
RectangleTool,
RoundRectTool,
TextTool,
ShapeTransformTool,
ZoomPlusTool,
ZoomMinusTool,
SaveTool,
LoadTool,
ExportTool,
UserSettingTool
];

// 各ツールを起動
const promises: Promise<void>[] = [];
for (let idx: number = 0; idx < tools.length; ++idx) {
const Tool: ToolImpl<any> = tools[idx];
const tool = new Tool();
if (!tool.initialize) {
continue;
}
tool.initialize();
}

return Promise.all(promises);
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $allHide } from "../../../menu/application/Menu";
import { $allHide } from "../../../../menu/application/Menu";

/**
* @description ツールエリアでマウスダウンした際の関数
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { $setActiveTool } from "../Tool";
import { $setActiveTool } from "../../Tool";
import { execute } from "./ToolAreaMouseMoveEventService";
import { EventType } from "../../domain/event/EventType";
import { EventType } from "../../../domain/event/EventType";

describe("ToolAreaMouseMoveEventServiceTest", () =>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EventType } from "../../domain/event/EventType";
import { $getActiveTool } from "../Tool";
import type { ToolImpl } from "../../../interface/ToolImpl";
import { EventType } from "../../../domain/event/EventType";
import { $getActiveTool } from "../../Tool";
import type { ToolImpl } from "../../../../interface/ToolImpl";

/**
* @description 選択中のツールの移動イベント関数
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $setCursor } from "../../../util/Global";
import { $setCursor } from "../../../../util/Global";
import { execute } from "./ToolAreaMouseOutEventService";

describe("ToolAreaMouseOutEventServiceTest", () =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $setCursor } from "../../../util/Global";
import { $setCursor } from "../../../../util/Global";

/**
* @description スクリーンエリアのDisplayObjectにマウスが乗った時の処理
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $getActiveTool, $registerDefaultTool, $setActiveTool } from "../Tool";
import { $getActiveTool, $registerDefaultTool, $setActiveTool } from "../../Tool";
import { execute } from "./ToolAreaResetService";

describe("ToolAreaResetServiceTest", () =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { ArrowTool } from "../../domain/model/ArrowTool";
import type { ToolImpl } from "../../../interface/ToolImpl";
import { EventType } from "../../domain/event/EventType";
import type { ArrowTool } from "../../../domain/model/ArrowTool";
import type { ToolImpl } from "../../../../interface/ToolImpl";
import { EventType } from "../../../domain/event/EventType";
import {
$getActiveTool,
$getDefaultTool,
$setActiveTool
} from "../Tool";
import { $TOOL_ARROW_NAME } from "../../../config/ToolConfig";
} from "../../Tool";
import { $TOOL_ARROW_NAME } from "../../../../config/ToolConfig";

/**
* @description ツールエリアを初回起動時の状態に戻す
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ToolImpl } from "../../../interface/ToolImpl";
import { $allHide } from "../../../menu/application/Menu";
import { $setActiveTool } from "../Tool";
import type { ToolImpl } from "../../../../interface/ToolImpl";
import { $allHide } from "../../../../menu/application/Menu";
import { $setActiveTool } from "../../Tool";

/**
* @description ユーザー設定ツールの選択時のユースケース
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { $TOOL_PREFIX } from "../../../config/ToolConfig";
import { EventType } from "../../domain/event/EventType";
import { $TOOL_PREFIX } from "../../../../config/ToolConfig";
import { EventType } from "../../../domain/event/EventType";
import { execute as toolAreaMouseMoveEventService } from "../service/ToolAreaMouseMoveEventService";
import { execute as toolAreaMouseOutEventService } from "../service/ToolAreaMouseOutEventService";
import { execute as toolAreaMouseDownEventService } from "../service/ToolAreaMouseDownEventService";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { execute as toolInitializeRegisterEventUseCase } from "./ToolInitializeRegisterEventUseCase";
import { execute as toolInitializeBootService } from "../service/ToolInitializeBootService";
import { execute as toolInitializeRegisterEventUseCase } from "./ToolAreaInitializeRegisterEventUseCase";
import { execute as toolInitializeBootService } from "../service/ToolAreaInitializeBootService";

/**
* @description ツールエリアの初期起動時のユースケース
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $registerMenu } from "../../../menu/application/Menu";
import { $registerMenu } from "../../../../menu/application/Menu";
import { execute } from "./UserSettingToolMouseDownEventService";

describe("UserSettingMouseDownEventServiceTest", () =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { $USER_MENU_NAME } from "../../../config/MenuConfig";
import { $getMenu } from "../../../menu/application/Menu";
import type { MenuImpl } from "../../../interface/MenuImpl";
import type { UserSettingMenu } from "../../../menu/domain/model/UserSettingMenu";
import { $USER_MENU_NAME } from "../../../../config/MenuConfig";
import { $getMenu } from "../../../../menu/application/Menu";
import type { MenuImpl } from "../../../../interface/MenuImpl";
import type { UserSettingMenu } from "../../../../menu/domain/model/UserSettingMenu";

/**
* @description ユーザー設定メニューの表示
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { $TOOL_USER_SETTING_ID } from "../../../config/ToolConfig";
import { EventType } from "../../domain/event/EventType";
import { $TOOL_USER_SETTING_ID } from "../../../../config/ToolConfig";
import { EventType } from "../../../domain/event/EventType";
import { execute as userSettingToolMouseDownEventUseCase } from "./UserSettingToolMouseDownEventUseCase";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { $USER_MENU_NAME } from "../../../config/MenuConfig";
import { $allHide } from "../../../menu/application/Menu";
import { $USER_MENU_NAME } from "../../../../config/MenuConfig";
import { $allHide } from "../../../../menu/application/Menu";
import { execute as userSettingToolMouseDownEventService } from "../service/UserSettingToolMouseDownEventService";

/**
Expand Down
60 changes: 0 additions & 60 deletions src/js/tool/application/service/ToolInitializeBootService.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/js/tool/domain/model/ArrowTool.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { $TOOL_ARROW_NAME } from "../../../config/ToolConfig";
import { BaseTool } from "./BaseTool";
import { execute as arrowToolInitializeUseCase } from "../../application/usecase/ArrowToolInitializeUseCase";
import { execute as arrowToolInitializeUseCase } from "../../application/ArrowTool/usecase/ArrowToolInitializeUseCase";

/**
* @description アローツールの管理クラス
Expand Down
2 changes: 1 addition & 1 deletion src/js/tool/domain/model/BaseTool.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ToolEvent } from "../event/ToolEvent";
import { EventType } from "../event/EventType";
import { $TOOL_PREFIX } from "../../../config/ToolConfig";
import { execute as toolChangeActiveUseCase } from "../../application/usecase/ToolChangeActiveUseCase";
import { execute as toolChangeActiveUseCase } from "../../application/ToolArea/usecase/ToolAreaChangeActiveUseCase";
import {
$registerDefaultTool
} from "../../application/Tool";
Expand Down
2 changes: 1 addition & 1 deletion src/js/tool/domain/model/UserSettingTool.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BaseTool } from "./BaseTool";
import { $TOOL_USER_SETTING_NAME } from "../../../config/ToolConfig";
import { execute as userSettingToolInitializeUseCase } from "../../application/usecase/UserSettingToolInitializeUseCase";
import { execute as userSettingToolInitializeUseCase } from "../../application/UserSettingTool/usecase/UserSettingToolInitializeUseCase";

/**
* @description 設定ツールの管理クラス
Expand Down

0 comments on commit a2f5747

Please sign in to comment.