File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,12 @@ export class Graph extends Basecoat<EventArgs> {
58
58
this . grid = new Grid ( this )
59
59
this . background = new Background ( this )
60
60
61
- this . model = this . options . model ? this . options . model : new Model ( )
62
- this . model . graph = this
61
+ if ( this . options . model ) {
62
+ this . model = this . options . model
63
+ } else {
64
+ this . model = new Model ( )
65
+ this . model . graph = this
66
+ }
63
67
64
68
this . renderer = new ViewRenderer ( this )
65
69
this . panning = new Panning ( this )
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ export class GraphView extends View {
201
201
}
202
202
203
203
if ( this . options . preventDefaultMouseDown ) {
204
- e . preventDefault ( )
204
+ evt . preventDefault ( )
205
205
}
206
206
207
207
const localPoint = this . graph . snapToGrid ( e . clientX , e . clientY )
@@ -213,7 +213,7 @@ export class GraphView extends View {
213
213
this . options . preventDefaultBlankAction &&
214
214
[ 'touchstart' ] . includes ( e . type )
215
215
) {
216
- e . preventDefault ( )
216
+ evt . preventDefault ( )
217
217
}
218
218
219
219
this . graph . trigger ( 'blank:mousedown' , {
You can’t perform that action at this time.
0 commit comments