Skip to content

Commit b49f13a

Browse files
committed
regester -> register (typo)
1 parent 7fa391b commit b49f13a

4 files changed

Lines changed: 23 additions & 8 deletions

File tree

src/graph-builder/graph-core/1-core.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class CoreGraph {
4141
this.bendNode = this.cy.add(
4242
{ group: 'nodes', data: { type: 'bend' }, classes: ['hidden'] },
4343
);
44-
this.regesterEvents();
44+
this.registerEvents();
4545
this.cy.emit('graph-modified');
4646
this.initizialize();
4747
}
@@ -106,6 +106,21 @@ class CoreGraph {
106106
this.cy.emit('graph-modified');
107107
}
108108

109+
setGraphFileHandle(fileHandle, shouldEmit = true) {
110+
this.fileHandle = fileHandle;
111+
if (shouldEmit) {
112+
this.dispatcher({
113+
type: T.SET_PROJECT_DETAILS,
114+
payload: {
115+
value: fileHandle,
116+
graphID: this.id,
117+
type: 'filehandle',
118+
},
119+
});
120+
}
121+
this.cy.emit('graph-modified');
122+
}
123+
109124
setServerID(serverID, shouldEmit = true) {
110125
this.serverID = serverID;
111126
if (shouldEmit) {
@@ -137,7 +152,7 @@ class CoreGraph {
137152
});
138153
}
139154

140-
regesterEvents() {
155+
registerEvents() {
141156
this.cy.on('select unselect', () => this.selectDeselectEventHandler());
142157
this.cy.on('grab', 'node[type = "ordin"]', (e) => {
143158
e.target.forEach((node) => {

src/graph-builder/graph-core/4-undo-redo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ class GraphUndoRedo extends GraphComponent {
145145
this.informUI();
146146
}
147147

148-
regesterEvents() {
149-
super.regesterEvents();
148+
registerEvents() {
149+
super.registerEvents();
150150
this.cy.on('dragfree', 'node[type = "ordin"]', (e) => {
151151
e.target.forEach((node) => {
152152
this.addPositionChange(node.id(), node.scratch('position'), { ...node.position() });

src/graph-builder/graph-core/5-load-save.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class GraphLoadSave extends GraphUndoRedo {
1313
this.autoSaveIntervalId = null;
1414
}
1515

16-
regesterEvents() {
17-
super.regesterEvents();
16+
registerEvents() {
17+
super.registerEvents();
1818
this.cy.on('add remove data dragfreeon', 'node[type="ordin"]', () => this.saveLocalStorage());
1919
this.cy.on('add remove data', 'edge[type="ordin"]', () => this.saveLocalStorage());
2020
this.cy.on('nodeediting.resizeend graph-modified', () => this.saveLocalStorage());

src/graph-builder/tailored-graph-builder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import getBoundaryPoint from './calculations/boundary-point';
44
import GA from './graph-actions';
55

66
class TailoredGraph extends CoreGraph {
7-
regesterEvents() {
8-
super.regesterEvents();
7+
registerEvents() {
8+
super.registerEvents();
99
this.cy.on('drag data moved', 'node[type="ordin"]', (evt) => {
1010
evt.target.connectedEdges().connectedNodes('node[type="special"]').forEach((juncNode) => {
1111
juncNode.position(TailoredGraph.calJuncNodePos(juncNode));

0 commit comments

Comments
 (0)