MCPcopy
hub / github.com/MrNothing/AI-Blocks / enableWidgets

Method enableWidgets

Sources/src/Model/UI/Scene.js:41–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39 }
40
41 enableWidgets()
42 {
43 $( function() {
44 $( ".scene-object" ).draggable({
45 start: function(event) {
46 let obj = window.service.objectsByID[event.target.id];
47 window.service.draggedobj = obj;
48 window.service.using_widget = true;
49 },
50 stop: function(event) {
51 window.service.draggedobj = null;
52 let obj = window.service.objectsByID[event.target.id];
53 window.service.sceneUI.updateObject(obj, obj.id, true);
54 window.service.using_widget = false;
55 }
56 });
57 $( ".scene-object" ).resizable({
58 minHeight: 50,
59 minWidth: 50,
60 start: function(event) {
61 window.service.using_widget = true;
62 },
63 stop: function(event) {
64 let obj = window.service.objectsByID[event.target.id];
65 window.service.sceneUI.updateObject(obj, obj.id, true);
66 window.service.using_widget = false;
67 }
68 });
69 });
70 }
71
72 updateObject(object, id, silent)
73 {

Callers 2

constructorMethod · 0.95
updateMethod · 0.95

Calls 1

updateObjectMethod · 0.80

Tested by

no test coverage detected