Skip to content

Commit c504f6f

Browse files
committed
u
1 parent f9cf650 commit c504f6f

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

src/flowchart_class.ts

+13-12
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export class Flowchart {
6666
const funcName = 'refresh';
6767
GFLog.debug(`${this.constructor.name}.${funcName}() : ${this.uid}`);
6868
this.xgraph?.update();
69-
this.setBackgroundColor(this.data.bgColor);
69+
this._setBackgroundColor(this.data.bgColor);
7070
this.events.emit('flowchart_updated', this);
7171
}
7272

@@ -145,7 +145,8 @@ export class Flowchart {
145145
//BACKGROUND
146146
set background(value: string) {
147147
if(value !== this.data.bgColor) {
148-
this.data.bgColor = value;
148+
// this.data.bgColor = value;
149+
this._setBackgroundColor(value);
149150
}
150151
}
151152

@@ -497,7 +498,7 @@ export class Flowchart {
497498
* @returns {this}
498499
* @memberof Flowchart
499500
*/
500-
setBackgroundColor(bgColor: string | null): this {
501+
private _setBackgroundColor(bgColor: string | null): this {
501502
this.data.bgColor = bgColor;
502503
if (bgColor) {
503504
this.container.style.backgroundColor = bgColor;
@@ -643,15 +644,15 @@ export class Flowchart {
643644
* @returns {this}
644645
* @memberof Flowchart
645646
*/
646-
setGraphContent(content: string): this {
647-
if (this.data.type === 'xml') {
648-
this.data.xml = content;
649-
}
650-
if (this.data.type === 'csv') {
651-
this.data.csv = content;
652-
}
653-
return this;
654-
}
647+
// setGraphContent(content: string): this {
648+
// if (this.data.type === 'xml') {
649+
// this.data.xml = content;
650+
// }
651+
// if (this.data.type === 'csv') {
652+
// this.data.csv = content;
653+
// }
654+
// return this;
655+
// }
655656

656657
/**
657658
* Load source from url

src/flowchart_handler.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class FlowchartHandler {
7474
window.clearInterval(this.mousedownTimeout);
7575
};
7676
if (oldData) {
77-
this._covert(oldData);
77+
this._convert(oldData);
7878
}
7979
this.init();
8080
}
@@ -149,7 +149,7 @@ export class FlowchartHandler {
149149
* @param {Object} obj
150150
* @memberof FlowchartHandler
151151
*/
152-
private _covert(obj: any): this {
152+
private _convert(obj: any): this {
153153
// TODO : why free instead init
154154
// this.clear();
155155
if (obj) {

src/flowcharts_options.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export class FlowchartsOptionsCtrl {
170170

171171
onColorChange(flowchart: Flowchart) {
172172
return (newColor: any) => {
173-
flowchart.setBackgroundColor(newColor);
173+
flowchart._setBackgroundColor(newColor);
174174
};
175175
}
176176

0 commit comments

Comments
 (0)