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 {
class PlowCtx {
gdh: Gdh = null;
debug = false;
nodraw = 0;
zoom_factor = 20.0;
base_zoom_factor = 20.0;
......
......@@ -1551,7 +1551,6 @@ class FlowCtx extends Rect {
gdraw: GDraw;
display_level = DisplayLevel.One;
gdh: Gdh = null;
debug = false;
zoom_factor = 20.0;
base_zoom_factor = 20.0;
offset_x = 0;
......
......@@ -86,7 +86,7 @@ class Appl {
}
graphName = graphName.toLowerCase();
if (graphName.charAt(".pwg") === -1) {
if (!graphName.endsWith(".pwg")) {
graphName += ".pwg";
}
......
This diff is collapsed.
......@@ -75,7 +75,7 @@ class GraphLocalDb {
let typeId = this.getTypeId(attributeName);
let name = this.getName(attributeName);
if (typeId === 0) {
return i;
return 0;
}
let id = this.nameToId(owner, name);
......@@ -212,7 +212,7 @@ class Graph {
constructor(appl) {
this.appl = appl;
if (typeof InstallTrigger !== 'undefined') {
if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
// Firefox is not os fast...
this.scan_time = 1;
this.fast_scan_time = 1;
......@@ -306,9 +306,6 @@ class Graph {
return ret;
}
let dyn = new Dyn(this);
if (type !== UserdataCbType.NodeClass) {
dyn.userdata = this;
}
ret.userdata = dyn;
ret.row = dyn.open(lines, row);
}
......@@ -354,7 +351,6 @@ class Graph {
case Event.MB1Down:
case Event.MB1DoubleClick:
case Event.MB3Press:
case Event.ValueChanged:
case Event.SliderMoveStart:
case Event.SliderMoveEnd:
case Event.SliderMoved:
......@@ -712,6 +708,18 @@ class Graph {
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) {
if (this.appl) {
return this.appl.command(cmd);
......@@ -754,4 +762,9 @@ class Graph {
loadCtx(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 {
}
enum Event {
Null,
MB1Click,
MB1Up = 2,
MB1Down,
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,
ValueChanged,
MenuCreate,
MenuActivated,
MenuDelete,
Exposure,
Enter,
Leave,
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,
SliderMoved,
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
}
......
......@@ -329,7 +329,6 @@ class GlowColor {
}
class GlowCustomColors {
debug = false;
colors_size = DrawType.CustomColor__ - DrawType.CustomColor1;
colors = new Array(this.colors_size);
colortheme_lightness = 0;
......@@ -380,10 +379,6 @@ class GlowCustomColors {
this.colors[j][0] = parseFloat(tokens[0]);
this.colors[j][1] = parseFloat(tokens[1]);
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;
case GlowSave.End:
......
......@@ -13,7 +13,6 @@ class GrowCtxWindow {
class GrowCtx extends Rect {
appl = null;
debug = false;
antiAliasing = 0;
name = null;
version = 0;
......@@ -110,10 +109,6 @@ class GrowCtx extends Rect {
let tokens = lines[i].split(' ');
let key = parseInt(tokens[0], 10);
if (this.debug) {
console.log("ctx : " + lines[i]);
}
switch (key) {
case GlowSave.Ctx:
break;
......
......@@ -470,10 +470,6 @@ class GrowTrend extends GrowRect {
return null;
}
getClassUserData() {
return this.nc.userdata;
}
getUserData() {
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