Skip to content

Commit

Permalink
Allow temporarily moving objects bound to handle
Browse files Browse the repository at this point in the history
  • Loading branch information
ricktu288 committed Dec 15, 2023
1 parent 77d6251 commit 37b1146
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions simulator/js/objs/handle.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ objTypes['handle'] = {
//將物件畫到Canvas上 Draw the obj on canvas
draw: function(obj, ctx, aboveLight) {

/*
for (var i in obj.controlPoints) {
// If user drags some target objs, restore them back to avoid unexpected behavior.
obj.controlPoints[i].mousePart.originalObj = JSON.parse(JSON.stringify(objs[obj.controlPoints[i].targetObj_index]));
objTypes[objs[obj.controlPoints[i].targetObj_index].type].dragging(objs[obj.controlPoints[i].targetObj_index], JSON.parse(JSON.stringify(obj.controlPoints[i].newPoint)), JSON.parse(JSON.stringify(obj.controlPoints[i].mousePart)), false, false);
}
*/
for (var i in obj.controlPoints) {
ctx.globalAlpha = 1;
ctx.beginPath();
Expand Down

0 comments on commit 37b1146

Please sign in to comment.