mirror of
https://github.com/sartography/diagram-js-code-editor.git
synced 2025-02-17 17:47:34 +00:00
Added Code window grabber
This commit is contained in:
parent
1522aff74a
commit
df25ec95ea
@ -33,6 +33,7 @@ export default function Editor(
|
|||||||
|
|
||||||
this._state = {
|
this._state = {
|
||||||
isOpen: undefined,
|
isOpen: undefined,
|
||||||
|
isEnabled: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
this._init();
|
this._init();
|
||||||
@ -50,15 +51,19 @@ export default function Editor(
|
|||||||
if (context.newSelection[0] && self._parent){
|
if (context.newSelection[0] && self._parent){
|
||||||
if (context.newSelection[0].type == "bpmn:ScriptTask"){
|
if (context.newSelection[0].type == "bpmn:ScriptTask"){
|
||||||
domClasses(self._parent).add('enabled');
|
domClasses(self._parent).add('enabled');
|
||||||
document.getElementById("cam-script-val");
|
self._state.isEnabled = true;
|
||||||
} else {
|
// grab script properties window
|
||||||
domClasses(self._parent).remove('enabled');
|
self._codestore = document.getElementById("cam-script-val");
|
||||||
if (self.isOpen()){
|
console.log(self._codestore);
|
||||||
self.close();
|
return;
|
||||||
}
|
}}
|
||||||
}
|
domClasses(self._parent).remove('enabled');
|
||||||
|
self._state.isEnabled = false;
|
||||||
|
if (self.isOpen()){
|
||||||
|
self.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Editor.$inject = [
|
Editor.$inject = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user