Skip to content

Commit

Permalink
Merge pull request #510 from CodingFactory-Repos/develop-G6
Browse files Browse the repository at this point in the history
Fix a few bugs on the canvas
  • Loading branch information
Loule95450 committed Jun 16, 2023
2 parents 6e35a7c + 7b8d5ca commit 0c9be95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion front-end/src/lib/pixi-tools-v2/class/socketManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class SocketManager extends Manager {
try {
const element = this.viewport.socketPlugin.elements[uuid];
if (element instanceof FramedContainer) {
const background = element.children[0] as Rectangle;
const background = element.mainContainer.children[0] as Rectangle;
background.color = serializedColorimetry.background.properties.color;
background.alpha = serializedColorimetry.background.properties.alpha;
background.draw({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ export class ViewportSocketPlugin extends utils.EventEmitter<CanvasSocketEvents>
this.elements[element.uuid] = element;
const genericChild = element.getGraphicChildren()[0];
this.elements[genericChild.uuid] = genericChild;
} else if (element instanceof TextContainer) {
this.elements[element.uuid] = element;
const genericChild = element.getGraphicChildren()[0];
this.elements[genericChild.uuid] = genericChild;
} else {
this.elements[element.uuid] = element;
}
Expand Down

0 comments on commit 0c9be95

Please sign in to comment.