Fixed Rouge Scolling Issue

This commit is contained in:
NWalker4483 2021-06-09 14:55:41 -04:00
parent a28e17b4b2
commit 0627b3d40b
2 changed files with 16 additions and 13 deletions

View File

@ -54,6 +54,11 @@ export default function Editor(
self.validate(); self.validate();
}); });
domEvent.bind(this._parent, 'wheel', function(event) {
// stop propagation and handle scroll differently
event.preventDefault();
event.stopPropagation();
});
// Check that the currently selected bpmn task is a script task and enable or disable coding window appropriately // Check that the currently selected bpmn task is a script task and enable or disable coding window appropriately
eventBus.on('selection.changed', function (context) { eventBus.on('selection.changed', function (context) {
@ -72,10 +77,11 @@ export default function Editor(
}); });
eventBus.on('editor.validate.response', function (response) { eventBus.on('editor.validate.response', function (response) {
if(response.type == "ok"){ // ? passing vs type if(response.type == "error"){
} else { } else {
response.msg; // Show Error Response if (response.passing){
// Update Status
}
} }
self._eventBus.fire("editor.toolbar.update"); self._eventBus.fire("editor.toolbar.update");
}); });
@ -149,6 +155,8 @@ Editor.prototype._init = function () {
// ? I'm pretty sure I can just create a template string that will hold all these definitions but I'll have to get into that // ? I'm pretty sure I can just create a template string that will hold all these definitions but I'll have to get into that
this.scripts = [];
var scripts_menu_container = document.createElement('div'); var scripts_menu_container = document.createElement('div');
domClasses(scripts_menu_container).add('dropdown'); domClasses(scripts_menu_container).add('dropdown');
@ -164,6 +172,8 @@ Editor.prototype._init = function () {
scripts_menu_container.appendChild(scripts_menu); scripts_menu_container.appendChild(scripts_menu);
//--------------------------------------------------------// //--------------------------------------------------------//
this.objects = [];
var objects_menu_container = document.createElement('div'); var objects_menu_container = document.createElement('div');
domClasses(objects_menu_container).add('dropdown'); domClasses(objects_menu_container).add('dropdown');
@ -193,13 +203,6 @@ Editor.prototype._init = function () {
this._eventBus.fire('editor.toolbar.update'); this._eventBus.fire('editor.toolbar.update');
}; };
Editor.prototype.updateObjectsMenu = function(){
}
Editor.prototype.updateScriptsMenu = function(){
}
Editor.prototype.validate = function () { Editor.prototype.validate = function () {
this._eventBus.fire('editor.validate.request', { code: this._codestore.value }); this._eventBus.fire('editor.validate.request', { code: this._codestore.value });

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "diagram-js-code-editor", "name": "diagram-js-code-editor",
"version": "1.0.2", "version": "1.0.6",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {