feat(preview-support): decouple the shared preview logic

This commit is contained in:
Ricardo Matias 2016-08-08 11:23:39 +02:00
parent 73487358a9
commit 0f4dbb32bd
2 changed files with 5 additions and 5 deletions

View File

@ -9,7 +9,7 @@ var assign = require('lodash/object/assign'),
var LOW_PRIORITY = 250;
function BpmnReplacePreview(eventBus, elementRegistry, elementFactory, canvas, movePreview) {
function BpmnReplacePreview(eventBus, elementRegistry, elementFactory, canvas, previewSupport) {
CommandInterceptor.call(this, eventBus);
@ -52,7 +52,7 @@ function BpmnReplacePreview(eventBus, elementRegistry, elementFactory, canvas, m
}
// clone the gfx of the temporary shape and add it to the drag group
var dragger = movePreview.addDragger(tempShape, context.dragGroup);
var dragger = previewSupport.addDragger(tempShape, context.dragGroup);
context.visualReplacements[id] = dragger;
@ -102,7 +102,7 @@ function BpmnReplacePreview(eventBus, elementRegistry, elementFactory, canvas, m
});
}
BpmnReplacePreview.$inject = [ 'eventBus', 'elementRegistry', 'elementFactory', 'canvas', 'movePreview' ];
BpmnReplacePreview.$inject = [ 'eventBus', 'elementRegistry', 'elementFactory', 'canvas', 'previewSupport' ];
inherits(BpmnReplacePreview, CommandInterceptor);

View File

@ -1,5 +1,5 @@
module.exports = {
__depends__: [ require('diagram-js/lib/features/move') ],
__init__: ['bpmnReplacePreview'],
__depends__: [ require('diagram-js/lib/features/preview-support') ],
__init__: [ 'bpmnReplacePreview' ],
bpmnReplacePreview: [ 'type', require('./BpmnReplacePreview') ]
};