Commit f201d1fb authored by Christoffer Ackelman's avatar Christoffer Ackelman

Web: More cleanup.

parent 2fce9529
This diff is collapsed.
...@@ -707,7 +707,6 @@ class GDraw { ...@@ -707,7 +707,6 @@ class GDraw {
class PlowCtx { class PlowCtx {
gdh: Gdh = null; gdh: Gdh = null;
debug = false;
nodraw = 0; nodraw = 0;
zoom_factor = 20.0; zoom_factor = 20.0;
base_zoom_factor = 20.0; base_zoom_factor = 20.0;
......
...@@ -1551,7 +1551,6 @@ class FlowCtx extends Rect { ...@@ -1551,7 +1551,6 @@ class FlowCtx extends Rect {
gdraw: GDraw; gdraw: GDraw;
display_level = DisplayLevel.One; display_level = DisplayLevel.One;
gdh: Gdh = null; gdh: Gdh = null;
debug = false;
zoom_factor = 20.0; zoom_factor = 20.0;
base_zoom_factor = 20.0; base_zoom_factor = 20.0;
offset_x = 0; offset_x = 0;
......
...@@ -86,7 +86,7 @@ class Appl { ...@@ -86,7 +86,7 @@ class Appl {
} }
graphName = graphName.toLowerCase(); graphName = graphName.toLowerCase();
if (graphName.charAt(".pwg") === -1) { if (!graphName.endsWith(".pwg")) {
graphName += ".pwg"; graphName += ".pwg";
} }
......
This diff is collapsed.
...@@ -75,7 +75,7 @@ class GraphLocalDb { ...@@ -75,7 +75,7 @@ class GraphLocalDb {
let typeId = this.getTypeId(attributeName); let typeId = this.getTypeId(attributeName);
let name = this.getName(attributeName); let name = this.getName(attributeName);
if (typeId === 0) { if (typeId === 0) {
return i; return 0;
} }
let id = this.nameToId(owner, name); let id = this.nameToId(owner, name);
...@@ -212,7 +212,7 @@ class Graph { ...@@ -212,7 +212,7 @@ class Graph {
constructor(appl) { constructor(appl) {
this.appl = appl; this.appl = appl;
if (typeof InstallTrigger !== 'undefined') { if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
// Firefox is not os fast... // Firefox is not os fast...
this.scan_time = 1; this.scan_time = 1;
this.fast_scan_time = 1; this.fast_scan_time = 1;
...@@ -306,9 +306,6 @@ class Graph { ...@@ -306,9 +306,6 @@ class Graph {
return ret; return ret;
} }
let dyn = new Dyn(this); let dyn = new Dyn(this);
if (type !== UserdataCbType.NodeClass) {
dyn.userdata = this;
}
ret.userdata = dyn; ret.userdata = dyn;
ret.row = dyn.open(lines, row); ret.row = dyn.open(lines, row);
} }
...@@ -354,7 +351,6 @@ class Graph { ...@@ -354,7 +351,6 @@ class Graph {
case Event.MB1Down: case Event.MB1Down:
case Event.MB1DoubleClick: case Event.MB1DoubleClick:
case Event.MB3Press: case Event.MB3Press:
case Event.ValueChanged:
case Event.SliderMoveStart: case Event.SliderMoveStart:
case Event.SliderMoveEnd: case Event.SliderMoveEnd:
case Event.SliderMoved: case Event.SliderMoved:
...@@ -712,6 +708,18 @@ class Graph { ...@@ -712,6 +708,18 @@ class Graph {
return Math.min(this.scan_time, this.animation_scan_time); return Math.min(this.scan_time, this.animation_scan_time);
} }
setScanTime(scan_time) {
this.scan_time = scan_time;
}
setFastScanTime(fast_scan_time) {
this.fast_scan_time = fast_scan_time;
}
setAnimationScanTime(animation_scan_time) {
this.animation_scan_time = animation_scan_time;
}
command(cmd) { command(cmd) {
if (this.appl) { if (this.appl) {
return this.appl.command(cmd); return this.appl.command(cmd);
...@@ -754,4 +762,9 @@ class Graph { ...@@ -754,4 +762,9 @@ class Graph {
loadCtx(file, read_cb) { loadCtx(file, read_cb) {
return this.frame.readGrowWindow(file, read_cb); return this.frame.readGrowWindow(file, read_cb);
} }
getReferenceName(name) {
// TODO
return null;
}
} }
\ No newline at end of file
...@@ -1653,20 +1653,93 @@ enum EventType { ...@@ -1653,20 +1653,93 @@ enum EventType {
} }
enum Event { enum Event {
Null,
MB1Click, MB1Click,
MB1Up = 2,
MB1Down,
MB1DoubleClick, MB1DoubleClick,
CursorMotion, MB1Press,
MB2Click,
MB2DoubleClick,
MB2Press,
MB1ClickShift,
MB1DoubleClickShift,
MB1PressShift,
MB2ClickShift,
MB2DoubleClickShift,
MB2PressShift,
MB1ClickCtrl,
MB1DoubleClickCtrl,
MB1PressCtrl,
MB2ClickCtrl,
MB2DoubleClickCtrl,
MB2PressCtrl,
MB1ClickShiftCtrl,
MB1DoubleClickShiftCtrl,
MB1PressShiftCtrl,
MB2ClickShiftCtrl,
MB2DoubleClickShiftCtrl,
MB2PressShiftCtrl,
MB3Click,
MB3Press,
ButtonRelease,
ButtonMotion, ButtonMotion,
ValueChanged, Exposure,
MenuCreate, Enter,
MenuActivated, Leave,
MenuDelete, CursorMotion,
Init,
PasteSequenceStart,
PasteSequenceEnd,
VisibilityUnobscured,
VisibilityObscured,
SelectClear,
ObjectMoved,
ObjectDeleted,
AnnotationInput,
Radiobutton,
Key_Return,
Key_Up,
Key_Down,
Key_Right,
Key_Left,
Key_PageUp,
Key_PageDown,
Key_BackSpace,
Key_PF1,
Key_PF2,
Key_PF3,
Key_PF4,
CreateGrowObject,
GrowDynamics,
SliderMoveStart, SliderMoveStart,
SliderMoved,
SliderMoveEnd, SliderMoveEnd,
MB3Press, SliderMoved,
HotRequest,
MB1Down,
MB1Up,
MB2Down,
MB2Up,
MB3Down,
MB3Up,
Key_Tab,
Map,
Unmap,
Resized,
Translate,
TipText,
Key_Ascii,
InputFocusLost,
InputFocusGained,
InputFocusInit,
Key_CtrlAscii,
Key_ShiftTab,
Key_Escape,
MenuActivated,
MenuCreate,
MenuDelete,
ScrollUp,
ScrollDown,
AnteUndo,
PostUndo,
Signal Signal
} }
......
...@@ -329,7 +329,6 @@ class GlowColor { ...@@ -329,7 +329,6 @@ class GlowColor {
} }
class GlowCustomColors { class GlowCustomColors {
debug = false;
colors_size = DrawType.CustomColor__ - DrawType.CustomColor1; colors_size = DrawType.CustomColor__ - DrawType.CustomColor1;
colors = new Array(this.colors_size); colors = new Array(this.colors_size);
colortheme_lightness = 0; colortheme_lightness = 0;
...@@ -380,10 +379,6 @@ class GlowCustomColors { ...@@ -380,10 +379,6 @@ class GlowCustomColors {
this.colors[j][0] = parseFloat(tokens[0]); this.colors[j][0] = parseFloat(tokens[0]);
this.colors[j][1] = parseFloat(tokens[1]); this.colors[j][1] = parseFloat(tokens[1]);
this.colors[j][2] = parseFloat(tokens[2]); this.colors[j][2] = parseFloat(tokens[2]);
if (this.debug) {
console.log(j, this.colors[j][0], this.colors[j][1],
this.colors[j][2]);
}
} }
break; break;
case GlowSave.End: case GlowSave.End:
......
...@@ -13,7 +13,6 @@ class GrowCtxWindow { ...@@ -13,7 +13,6 @@ class GrowCtxWindow {
class GrowCtx extends Rect { class GrowCtx extends Rect {
appl = null; appl = null;
debug = false;
antiAliasing = 0; antiAliasing = 0;
name = null; name = null;
version = 0; version = 0;
...@@ -110,10 +109,6 @@ class GrowCtx extends Rect { ...@@ -110,10 +109,6 @@ class GrowCtx extends Rect {
let tokens = lines[i].split(' '); let tokens = lines[i].split(' ');
let key = parseInt(tokens[0], 10); let key = parseInt(tokens[0], 10);
if (this.debug) {
console.log("ctx : " + lines[i]);
}
switch (key) { switch (key) {
case GlowSave.Ctx: case GlowSave.Ctx:
break; break;
......
...@@ -470,10 +470,6 @@ class GrowTrend extends GrowRect { ...@@ -470,10 +470,6 @@ class GrowTrend extends GrowRect {
return null; return null;
} }
getClassUserData() {
return this.nc.userdata;
}
getUserData() { getUserData() {
return this.userdata; return this.userdata;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment