-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
90 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...receive/application/controller/application/LibraryArea/Shape/ShapeAddNewReceiveUseCase.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...application/controller/application/LibraryArea/Shape/ShapeUpdateGraphicsReceiveUseCase.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import type { ShareReceiveMessageImpl } from "@/interface/ShareReceiveMessageImpl"; | ||
import type { InstanceImpl } from "@/interface/InstanceImpl"; | ||
import type { ShapeSaveObjectImpl } from "@/interface/ShapeSaveObjectImpl"; | ||
import type { MovieClip } from "@/core/domain/model/MovieClip"; | ||
import type { BoundsImpl } from "@/interface/BoundsImpl"; | ||
import { $getWorkSpace } from "@/core/application/CoreUtil"; | ||
import { execute as externalShapeApplyGraphicsUseCase } from "@/external/core/application/ExternalShape/usecase/ExternalShapeApplyGraphicsUseCase"; | ||
|
||
/** | ||
* @description socketで受け取った情報の受け取り処理関数 | ||
* Receiving and processing functions for information received in the socket | ||
* | ||
* @param {object} message | ||
* @return {Promise} | ||
* @method | ||
* @public | ||
*/ | ||
export const execute = async (message: ShareReceiveMessageImpl): Promise<void> => | ||
{ | ||
const id = message.data[0] as NonNullable<number>; | ||
|
||
const workSpace = $getWorkSpace(id); | ||
if (!workSpace) { | ||
return ; | ||
} | ||
|
||
const libraryId = message.data[1] as NonNullable<number>; | ||
const movieClip: InstanceImpl<MovieClip> = workSpace.getLibrary(libraryId); | ||
if (!movieClip) { | ||
return ; | ||
} | ||
|
||
const beforeShapeObject = message.data[2] as ShapeSaveObjectImpl; | ||
const shape = workSpace.getLibrary(beforeShapeObject.id); | ||
if (!shape) { | ||
return ; | ||
} | ||
|
||
// Shapeのグラフィックスを更新 | ||
await externalShapeApplyGraphicsUseCase( | ||
workSpace, | ||
movieClip, | ||
shape, | ||
message.data[3] as number[], | ||
message.data[4] as BoundsImpl, | ||
true | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters