File tree 3 files changed +6
-12
lines changed
3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,15 @@ export let app;
37
37
store,
38
38
components,
39
39
data : {
40
- paper : Paper , // in order to watch translation
40
+ paper : Paper , // necessary to watch translation and scale
41
41
workflowId : undefined
42
42
} ,
43
43
computed : {
44
44
translation ( ) {
45
- return Paper . translation ;
45
+ return this . paper . translation ;
46
46
} ,
47
47
scale ( ) {
48
- return Paper . scale ;
48
+ return this . paper . scale ;
49
49
} ,
50
50
// this computed method is necessary since we shouldn't
51
51
// listen to the store directly
@@ -117,12 +117,6 @@ export let app;
117
117
undo ( ) {
118
118
UndoRedoHistory . undo ( ) ;
119
119
} ,
120
- addLink ( payload ) {
121
- this . $addLink ( { ...payload } ) ;
122
- } ,
123
- deleteLink ( payload ) {
124
- this . $deleteLink ( { ...payload } ) ;
125
- } ,
126
120
deleteElementByCellView ( cellView ) {
127
121
const boxId = cellView . model . attributes . boxId ;
128
122
this . $deleteElements ( {
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ class Paper {
181
181
distance : - 30 ,
182
182
action : function ( ) {
183
183
this . model . remove ( { ui : true , tool : this . cid } ) ;
184
- app . deleteLink ( { link : this . model } ) ;
184
+ app . $ deleteLink( { link : this . model } ) ;
185
185
}
186
186
} )
187
187
]
@@ -194,7 +194,7 @@ class Paper {
194
194
} ) ;
195
195
196
196
this . _paper . on ( "link:connect" , linkView => {
197
- app . addLink ( { link : linkView . model . attributes } ) ;
197
+ app . $ addLink( { link : linkView . model . attributes } ) ;
198
198
} ) ;
199
199
200
200
this . _paper . on (
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import Paper from "../classes/Paper";
17
17
const SCALE_CONTENT_PADDING = 10 ;
18
18
19
19
const Minimap = Vue . component ( "Minimap" , {
20
- props : [ "movedElements" , "scale" ] ,
20
+ props : [ "movedElements" , "scale" , "translation" ] ,
21
21
data : function ( ) {
22
22
return {
23
23
mapDragFlag : false ,
You can’t perform that action at this time.
0 commit comments