chore(project): use inherits util
This commit is contained in:
parent
695a973e92
commit
e7bbb5d6bf
|
@ -1,5 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var inherits = require('inherits');
|
||||
|
||||
var IdSupport = require('bpmn-moddle/lib/id-support'),
|
||||
Ids = require('ids');
|
||||
|
||||
|
@ -36,7 +38,7 @@ function Modeler(options) {
|
|||
Viewer.call(this, options);
|
||||
}
|
||||
|
||||
Modeler.prototype = Object.create(Viewer.prototype);
|
||||
inherits(Modeler, Viewer);
|
||||
|
||||
Modeler.prototype.createDiagram = function(done) {
|
||||
return this.importXML(initialDiagram, done);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var inherits = require('inherits');
|
||||
|
||||
var Viewer = require('./Viewer');
|
||||
|
||||
|
||||
|
@ -12,7 +14,7 @@ function NavigatedViewer(options) {
|
|||
Viewer.call(this, options);
|
||||
}
|
||||
|
||||
NavigatedViewer.prototype = Object.create(Viewer.prototype);
|
||||
inherits(NavigatedViewer, Viewer);
|
||||
|
||||
module.exports = NavigatedViewer;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var isArray = require('lodash/lang/isArray'),
|
||||
var inherits = require('inherits'),
|
||||
isArray = require('lodash/lang/isArray'),
|
||||
isObject = require('lodash/lang/isObject'),
|
||||
assign = require('lodash/object/assign'),
|
||||
forEach = require('lodash/collection/forEach'),
|
||||
|
@ -1510,7 +1511,7 @@ function BpmnRenderer(events, styles, pathMap) {
|
|||
this.drawConnection = drawConnection;
|
||||
}
|
||||
|
||||
BpmnRenderer.prototype = Object.create(DefaultRenderer.prototype);
|
||||
inherits(BpmnRenderer, DefaultRenderer);
|
||||
|
||||
|
||||
BpmnRenderer.$inject = [ 'eventBus', 'styles', 'pathMap' ];
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var assign = require('lodash/object/assign');
|
||||
var assign = require('lodash/object/assign'),
|
||||
inherits = require('inherits');
|
||||
|
||||
var BaseElementFactory = require('diagram-js/lib/core/ElementFactory'),
|
||||
LabelUtil = require('../../util/Label');
|
||||
|
@ -16,7 +17,8 @@ function ElementFactory(bpmnFactory, moddle) {
|
|||
this._moddle = moddle;
|
||||
}
|
||||
|
||||
ElementFactory.prototype = Object.create(BaseElementFactory.prototype);
|
||||
inherits(ElementFactory, BaseElementFactory);
|
||||
|
||||
|
||||
ElementFactory.$inject = [ 'bpmnFactory', 'moddle' ];
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var inherits = require('inherits');
|
||||
|
||||
var BaseLayouter = require('diagram-js/lib/features/modeling/Layouter'),
|
||||
LayoutUtil = require('diagram-js/lib/layout/Util'),
|
||||
ManhattanLayout = require('diagram-js/lib/layout/ManhattanLayout');
|
||||
|
@ -7,7 +9,7 @@ var BaseLayouter = require('diagram-js/lib/features/modeling/Layouter'),
|
|||
|
||||
function Layouter() {}
|
||||
|
||||
Layouter.prototype = Object.create(BaseLayouter.prototype);
|
||||
inherits(Layouter, BaseLayouter);
|
||||
|
||||
module.exports = Layouter;
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var inherits = require('inherits');
|
||||
|
||||
var BaseModeling = require('diagram-js/lib/features/modeling/Modeling');
|
||||
|
||||
var UpdatePropertiesHandler = require('./cmd/UpdatePropertiesHandler');
|
||||
|
@ -16,12 +18,13 @@ function Modeling(eventBus, elementFactory, commandStack) {
|
|||
BaseModeling.call(this, eventBus, elementFactory, commandStack);
|
||||
}
|
||||
|
||||
Modeling.prototype = Object.create(BaseModeling.prototype);
|
||||
inherits(Modeling, BaseModeling);
|
||||
|
||||
Modeling.$inject = [ 'eventBus', 'elementFactory', 'commandStack' ];
|
||||
|
||||
module.exports = Modeling;
|
||||
|
||||
|
||||
Modeling.prototype.getHandlers = function() {
|
||||
var handlers = BaseModeling.prototype.getHandlers.call(this);
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
var groupBy = require('lodash/collection/groupBy'),
|
||||
size = require('lodash/collection/size'),
|
||||
forEach = require('lodash/collection/forEach');
|
||||
forEach = require('lodash/collection/forEach'),
|
||||
inherits = require('inherits');
|
||||
|
||||
var RuleProvider = require('diagram-js/lib/features/rules/RuleProvider');
|
||||
|
||||
|
@ -11,12 +12,12 @@ function ModelingRules(eventBus) {
|
|||
RuleProvider.call(this, eventBus);
|
||||
}
|
||||
|
||||
inherits(ModelingRules, RuleProvider);
|
||||
|
||||
ModelingRules.$inject = [ 'eventBus' ];
|
||||
|
||||
module.exports = ModelingRules;
|
||||
|
||||
ModelingRules.prototype = Object.create(RuleProvider.prototype);
|
||||
|
||||
|
||||
ModelingRules.prototype.init = function() {
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
"diagram-js-direct-editing": "^0.9.0",
|
||||
"didi": "^0.0.4",
|
||||
"ids": "^0.1.0",
|
||||
"inherits": "^2.0.1",
|
||||
"lodash": "^3.0.1",
|
||||
"min-dom": "^0.2.0",
|
||||
"object-refs": "^0.1.0"
|
||||
|
|
Loading…
Reference in New Issue