Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
867fdfb6
Commit
867fdfb6
authored
May 09, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Web: Minor cleanup.
parent
121334c9
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
837 additions
and
937 deletions
+837
-937
java/jsw/co/src/cli.ts
java/jsw/co/src/cli.ts
+12
-14
java/jsw/co/src/gdh.ts
java/jsw/co/src/gdh.ts
+27
-48
java/jsw/co/src/plow.ts
java/jsw/co/src/plow.ts
+66
-99
java/jsw/co/src/pwr.ts
java/jsw/co/src/pwr.ts
+8
-2
java/jsw/ev/src/ev.html
java/jsw/ev/src/ev.html
+53
-29
java/jsw/ev/src/ev.ts
java/jsw/ev/src/ev.ts
+116
-119
java/jsw/flow/src/flow.html
java/jsw/flow/src/flow.html
+26
-18
java/jsw/flow/src/flow.ts
java/jsw/flow/src/flow.ts
+189
-292
java/jsw/ge/src/ge.html
java/jsw/ge/src/ge.html
+62
-62
java/jsw/ge/src/ge_appl.ts
java/jsw/ge/src/ge_appl.ts
+1
-0
java/jsw/ge/src/ge_dyn.ts
java/jsw/ge/src/ge_dyn.ts
+19
-18
java/jsw/ge/src/ge_graph.ts
java/jsw/ge/src/ge_graph.ts
+9
-3
java/jsw/opwind/src/crypt.ts
java/jsw/opwind/src/crypt.ts
+5
-5
java/jsw/opwind/src/opwind.html
java/jsw/opwind/src/opwind.html
+21
-20
java/jsw/opwind/src/opwind.ts
java/jsw/opwind/src/opwind.ts
+57
-61
java/jsw/opwind/src/opwind_menu.html
java/jsw/opwind/src/opwind_menu.html
+26
-27
java/jsw/xtt/src/xtt.html
java/jsw/xtt/src/xtt.html
+41
-25
java/jsw/xtt/src/xtt.ts
java/jsw/xtt/src/xtt.ts
+99
-95
No files found.
java/jsw/co/src/cli.ts
View file @
867fdfb6
...
...
@@ -3,6 +3,7 @@
class
CliTable
{
command
:
string
;
qualifier
:
Array
<
string
>
;
constructor
(
command
,
qualifier
)
{
this
.
command
=
command
;
this
.
qualifier
=
qualifier
;
...
...
@@ -32,19 +33,16 @@ enum State {
}
class
Cli
{
verb
:
Array
;
qualifier
:
Array
;
qualValue
:
Array
;
verb
:
Array
=
new
Array
(
CliC
.
VERB_VECT_SIZE
)
;
qualifier
:
Array
=
new
Array
(
30
)
;
qualValue
:
Array
=
new
Array
(
30
)
;
status
:
number
;
cliTableIndex
:
number
;
cliQualifierIndex
:
Array
;
cliQualifierIndex
:
Array
=
new
Array
(
30
)
;
configuredVerbs
:
number
;
cliTable
:
Array
<
CliTable
>
;
constructor
(
cliTable
)
{
this
.
verb
=
new
Array
(
CliC
.
VERB_VECT_SIZE
);
this
.
qualifier
=
new
Array
(
30
);
this
.
qualValue
=
new
Array
(
30
);
this
.
cliQualifierIndex
=
new
Array
(
30
);
this
.
cliTable
=
cliTable
;
}
...
...
java/jsw/co/src/gdh.ts
View file @
867fdfb6
...
...
@@ -130,15 +130,13 @@ class GlowBarChartInfo {
class
GlowTableInfo
{
columns
;
rows
;
column_size
:
Array
;
constructor
()
{
this
.
column_size
=
new
Array
(
30
);
}
column_size
:
Array
=
new
Array
(
30
);
}
class
PendingData
{
func_cb
:
(
id
:
number
,
val
:
number
,
sts
:
number
=
0
,
res
:
number
=
0
)
=>
void
;
data
:
object
;
constructor
(
func_cb
,
data
)
{
this
.
func_cb
=
func_cb
;
this
.
data
=
data
;
...
...
@@ -227,6 +225,7 @@ enum Msg {
class
Uint8ArrayHelper
{
buf
:
Uint8Array
;
idx
:
number
;
constructor
(
size
,
tag
)
{
this
.
buf
=
new
Uint8Array
(
size
);
this
.
buf
[
0
]
=
tag
;
...
...
@@ -255,10 +254,10 @@ class Uint8ArrayHelper {
class
DataViewHelper
{
dv
:
DataView
;
offset
:
number
;
offset
=
0
;
constructor
(
data
:
ArrayBuffer
)
{
this
.
dv
=
new
DataView
(
data
);
this
.
offset
=
0
;
}
getUint8
()
{
...
...
@@ -266,11 +265,6 @@ class DataViewHelper {
return
this
.
dv
.
getUint8
(
this
.
offset
-
1
);
}
getInt16
()
{
this
.
offset
+=
2
;
return
this
.
dv
.
getInt16
(
this
.
offset
-
2
);
}
getUint16
()
{
this
.
offset
+=
2
;
return
this
.
dv
.
getUint8
(
this
.
offset
-
2
);
...
...
@@ -302,32 +296,17 @@ class DataViewHelper {
}
class
Gdh
{
debug
:
boolean
;
pending
:
Array
;
sub
:
Array
<
Sub
>
;
PORT
:
number
;
ws
:
WebSocket
;
open_cb
:
()
=>
void
;
close_cb
:
()
=>
void
;
return_cb
:
()
=>
void
;
next_id
:
number
;
subscriptionCount
:
number
;
listSent
:
boolean
;
constructor
()
{
this
.
debug
=
false
;
this
.
pending
=
[];
this
.
sub
=
[];
this
.
PORT
=
4448
;
this
.
ws
=
null
;
this
.
open_cb
=
null
;
this
.
close_cb
=
null
;
this
.
return_cb
=
null
;
this
.
next_id
=
1234
;
this
.
subscriptionCount
=
1
;
this
.
listSent
=
false
;
}
init
()
{
debug
=
false
;
pending
:
Array
=
[];
sub
:
Array
<
Sub
>
=
[];
static
PORT
=
4448
;
ws
:
WebSocket
=
null
;
return_cb
:
()
=>
void
=
null
;
next_id
=
1234
;
subscriptionCount
=
1
;
listSent
=
false
;
constructor
(
open_cb
,
close_cb
=
null
)
{
if
(
window
.
location
.
hostname
===
""
)
{
this
.
ws
=
new
WebSocket
(
"
ws:127.0.0.1:4448
"
);
}
else
{
...
...
@@ -336,8 +315,8 @@ class Gdh {
this
.
ws
.
binaryType
=
"
arraybuffer
"
;
this
.
ws
.
onopen
=
function
(
e
)
{
if
(
this
.
gdh
.
open_cb
!==
null
)
{
this
.
gdh
.
open_cb
();
if
(
open_cb
!==
null
)
{
open_cb
();
}
};
...
...
@@ -345,8 +324,8 @@ class Gdh {
if
(
this
.
debug
)
{
console
.
log
(
"
Socket closed
"
);
}
if
(
this
.
gdh
.
close_cb
!==
null
)
{
this
.
gdh
.
close_cb
();
if
(
close_cb
!==
null
)
{
close_cb
();
}
};
...
...
java/jsw/co/src/plow.ts
View file @
867fdfb6
...
...
@@ -122,15 +122,13 @@ enum Event {
class
PlowNodeClass
{
a
:
PlowArray
;
ctx
:
PlowCtx
;
nc_name
:
string
;
group
:
number
;
node_open
:
number
;
nc_name
=
""
;
group
=
0
;
node_open
=
0
;
constructor
(
ctx
)
{
this
.
a
=
new
PlowArray
(
ctx
);
this
.
ctx
=
ctx
;
this
.
nc_name
=
""
;
this
.
group
=
0
;
this
.
node_open
=
0
;
}
draw
(
g
,
p
,
node
,
highlight
)
{
...
...
@@ -143,10 +141,10 @@ class PlowNodeClass {
}
class
PlowArray
{
a
:
Array
<
PlowNode
>
;
a
:
Array
=
[]
;
ctx
:
PlowCtx
;
constructor
(
ctx
)
{
this
.
a
=
[];
this
.
ctx
=
ctx
;
}
...
...
@@ -391,56 +389,35 @@ class PlowArray {
class
PlowNode
{
ctx
:
PlowCtx
;
userdata
:
object
;
x_right
:
number
;
x_left
:
number
;
y_high
:
number
;
y_low
:
number
;
userdata
:
object
=
null
;
x_right
=
0.0
;
x_left
=
0.0
;
y_high
=
0.0
;
y_low
=
0.0
;
nc
:
PlowNodeClass
;
pos
:
Point
;
n_name
:
string
;
annotv
:
Array
;
annotsize
:
Array
;
pixmapv
:
Array
;
trace_object
:
string
;
trace_attribute
:
string
;
trace_attr_type
:
number
;
highlight
:
boolean
;
select
:
boolean
;
invert
:
boolean
;
pos
=
new
Point
()
;
n_name
=
""
;
annotv
=
[]
;
annotsize
=
[]
;
pixmapv
=
[]
;
trace_object
=
""
;
trace_attribute
=
""
;
trace_attr_type
=
0
;
highlight
=
false
;
select
=
false
;
invert
=
false
;
level
:
number
;
node_open
:
number
;
fill_color
:
number
;
p
:
number
;
old_value
:
number
;
first_scan
:
boolean
;
relative_position
:
number
;
node_open
=
0
;
fill_color
=
0
;
p
=
0
;
old_value
=
0
;
first_scan
=
true
;
relative_position
=
0
;
constructor
(
ctx
,
nc
,
level
)
{
this
.
ctx
=
ctx
;
this
.
userdata
=
null
;
this
.
x_right
=
0.0
;
this
.
x_left
=
0.0
;
this
.
y_high
=
0.0
;
this
.
y_low
=
0.0
;
this
.
nc
=
nc
;
this
.
pos
=
new
Point
();
this
.
n_name
=
""
;
this
.
annotv
=
[];
this
.
annotsize
=
[];
this
.
pixmapv
=
[];
this
.
trace_object
=
""
;
this
.
trace_attribute
=
""
;
this
.
trace_attr_type
=
0
;
this
.
highlight
=
false
;
this
.
select
=
false
;
this
.
invert
=
false
;
this
.
level
=
level
;
this
.
node_open
=
0
;
this
.
fill_color
=
0
;
this
.
p
=
0
;
this
.
old_value
=
0
;
this
.
first_scan
=
true
;
this
.
relative_position
=
0
;
}
set_annotation
(
number
,
text
)
{
...
...
@@ -570,13 +547,14 @@ class PlowNode {
}
class
PlowAnnot
{
RELATIVE_OFFSET
=
1
;
static
RELATIVE_OFFSET
=
1
;
ctx
:
PlowCtx
;
p
:
Point
;
draw_type
:
number
;
text_size
:
number
;
annot_type
:
number
;
number
:
number
;
constructor
(
ctx
,
x
,
y
,
text_size
,
text_color
,
annot_type
,
number
)
{
this
.
p
=
new
Point
(
x
,
y
);
this
.
draw_type
=
text_color
;
...
...
@@ -646,7 +624,7 @@ class PlowAnnot {
let
y
=
(
this
.
p
.
y
+
p0
.
y
)
*
this
.
ctx
.
zoom_factor
-
tsize
/
4
;
if
((
this
.
annot_type
&
RELATIVE_POSITION
)
!==
0
)
{
let
rel_x
=
(
p0
.
x
+
node
.
relative_position
+
this
.
RELATIVE_OFFSET
)
*
let
rel_x
=
(
p0
.
x
+
node
.
relative_position
+
PlowAnnot
.
RELATIVE_OFFSET
)
*
this
.
ctx
.
zoom_factor
;
if
(
x
<
rel_x
)
{
x
=
rel_x
;
...
...
@@ -674,6 +652,7 @@ class PlowAnnotPixmap {
ctx
:
PlowCtx
;
p
:
Point
;
number
:
number
;
constructor
(
ctx
,
x
,
y
,
number
)
{
this
.
p
=
new
Point
(
x
,
y
);
this
.
number
=
number
;
...
...
@@ -729,6 +708,7 @@ class PlowRect {
fill_color
:
number
;
fill
:
number
;
fix_color
:
number
;
constructor
(
ctx
,
x
,
y
,
width
,
height
,
fill_color
,
border_color
,
fill
,
fix_color
)
{
this
.
ll
=
new
Point
(
x
,
y
);
this
.
ur
=
new
Point
(
x
+
width
,
y
+
height
);
...
...
@@ -817,6 +797,7 @@ class GDraw {
canvas
:
HTMLCanvasElement
;
gctx
:
CanvasRenderingContext2D
;
offset_top
:
number
;
constructor
(
ctx
)
{
this
.
ctx
=
ctx
;
this
.
canvas
=
document
.
querySelector
(
"
canvas
"
);
...
...
@@ -826,43 +807,29 @@ class GDraw {
}
class
PlowCtx
{
gdh
:
Gdh
;
debug
:
boolean
;
nodraw
:
number
;
zoom_factor
:
number
;
base_zoom_factor
:
number
;
offset_x
:
number
;
offset_y
:
number
;
x_right
:
number
;
x_left
:
number
;
y_high
:
number
;
y_low
:
number
;
gdh
:
Gdh
=
null
;
debug
=
false
;
nodraw
=
0
;
zoom_factor
=
20.0
;
base_zoom_factor
=
20.0
;
offset_x
=
0
;
offset_y
=
0
;
x_right
=
0.0
;
x_left
=
0.0
;
y_high
=
0.0
;
y_low
=
0.0
;
a
:
PlowArray
;
a_nc
:
PlowArray
;
name
:
string
;
name
=
"
Claes context
"
;
gdraw
:
GDraw
;
select_object
:
PlowNode
;
event_cb
:
(
event
:
object
,
object
:
PlowNode
,
x
:
number
,
y
:
number
)
=>
void
;
event_object
:
PlowNode
;
select_object
:
PlowNode
=
null
;
event_cb
:
(
event
:
object
,
object
:
PlowNode
,
x
:
number
,
y
:
number
)
=>
void
=
null
;
event_object
:
PlowNode
=
null
;
constructor
()
{
this
.
gdh
=
null
;
this
.
debug
=
false
;
this
.
nodraw
=
0
;
this
.
zoom_factor
=
20.0
;
this
.
base_zoom_factor
=
20.0
;
this
.
offset_x
=
0
;
this
.
offset_y
=
0
;
this
.
x_right
=
0.0
;
this
.
x_left
=
0.0
;
this
.
y_high
=
0.0
;
this
.
y_low
=
0.0
;
this
.
a
=
new
PlowArray
(
this
);
this
.
a_nc
=
new
PlowArray
(
this
);
this
.
name
=
"
Claes context
"
;
this
.
gdraw
=
new
GDraw
(
this
);
this
.
select_object
=
null
;
this
.
event_cb
=
null
;
this
.
event_object
=
null
;
}
draw
()
{
...
...
java/jsw/co/src/pwr.ts
View file @
867fdfb6
...
...
@@ -159,6 +159,7 @@ enum XttMntMethodsMask {
class
PwrtObjid
{
vid
:
number
;
oix
:
number
;
constructor
(
vid
,
oix
)
{
this
.
oix
=
oix
;
this
.
vid
=
vid
;
...
...
@@ -176,6 +177,7 @@ class PwrtAttrRef {
class
CdhrNumber
{
value
:
number
;
sts
:
number
;
constructor
(
value
,
sts
)
{
this
.
value
=
value
;
this
.
sts
=
sts
;
...
...
@@ -195,9 +197,11 @@ class UserdataCbReturn {
class
Point
{
x
=
0
;
y
=
0
;
constructor
()
{
}
constructor
(
x
:
number
,
y
:
number
)
{
constructor
(
x
:
number
,
y
:
number
)
{
this
.
x
=
x
;
this
.
y
=
y
;
}
...
...
@@ -208,9 +212,11 @@ class Rect {
y
=
0
;
width
=
0
;
height
=
0
;
constructor
()
{
}
constructor
(
x
:
number
,
y
:
number
,
width
:
number
,
height
:
number
)
{
constructor
(
x
:
number
,
y
:
number
,
width
:
number
,
height
:
number
)
{
this
.
x
=
x
;
this
.
y
=
y
;
this
.
width
=
width
;
...
...
java/jsw/ev/src/ev.html
View file @
867fdfb6
<!DOCTYPE html>
<html>
<head>
<head>
<title>
Alarm List
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
</head>
<body>
<body>
<div
class=
"toolbar"
role=
"toolbar"
>
<div
id=
"toolitem1"
tabindex=
"0"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_ack.png"
><img>
....
</div>
<div
id=
"toolitem2"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_navigator.png"
><img></div>
<div
id=
"toolitem3"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_plc.png"
><img>
....
</div>
<div
id=
"toolitem4"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_graph.png"
><img></div>
<div
id=
"toolitem5"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_objectgraph.png"
><img></div>
<div
id=
"toolitem6"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_navigator.png"
><img></div>
<div
id=
"toolitem7"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_plc.png"
><img></div>
<div
id=
"toolitem8"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_history.png"
><img></div>
<div
id=
"toolitem9"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_object.png"
><img></div>
<div
id=
"toolitem10"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_crossref.png"
><img></div>
<div
id=
"toolitem11"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_help.png"
><img></div>
<div
id=
"toolitem12"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_classhelp.png"
><img></div>
<div
id=
"toolitem1"
tabindex=
"0"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_ack.png"
/>
....
</div>
<div
id=
"toolitem2"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_navigator.png"
/>
</div>
<div
id=
"toolitem3"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_plc.png"
/>
....
</div>
<div
id=
"toolitem4"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_graph.png"
/>
</div>
<div
id=
"toolitem5"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_objectgraph.png"
/>
</div>
<div
id=
"toolitem6"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_navigator.png"
/>
</div>
<div
id=
"toolitem7"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_plc.png"
/>
</div>
<div
id=
"toolitem8"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_history.png"
/>
</div>
<div
id=
"toolitem9"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_object.png"
/>
</div>
<div
id=
"toolitem10"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_crossref.png"
/>
</div>
<div
id=
"toolitem11"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_help.png"
/>
</div>
<div
id=
"toolitem12"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_classhelp.png"
/>
</div>
</div>
<canvas
id=
"flowcanvas"
width=
"1200"
height=
"800"
></canvas>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
...
...
@@ -29,5 +53,5 @@
<script
type=
"text/babel"
src=
"ev.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
</body>
</html>
java/jsw/ev/src/ev.ts
View file @
867fdfb6
...
...
@@ -15,14 +15,12 @@ class Ev {
ncSuccess
:
PlowNodeClass
;
scan_update
:
boolean
;
priv
:
number
;
mhSyncIdx
:
number
;
maxEve
:
number
;
mhSyncIdx
=
0
;
maxEve
=
30
;
type
:
EvType
;
timer
:
number
;
constructor
()
{
this
.
mhSyncIdx
=
0
;
this
.
maxEve
=
30
;
constructor
()
{
this
.
type
=
this
.
get_type
();
switch
(
this
.
type
)
{
case
EvType
.
EventList
:
...
...
@@ -39,9 +37,7 @@ class Ev {
this
.
ctx
.
event_cb
=
this
.
plow_event
;
this
.
createNodeClasses
();
this
.
ctx
.
gdh
=
new
Gdh
();
this
.
ctx
.
gdh
.
open_cb
=
this
.
gdh_init_cb
;
this
.
ctx
.
gdh
.
init
();
this
.
ctx
.
gdh
=
new
Gdh
(
this
.
gdh_init_cb
);
this
.
ctx
.
gdraw
.
canvas
.
addEventListener
(
"
click
"
,
function
(
event
)
{
let
y
=
event
.
pageY
-
this
.
ctx
.
gdraw
.
offset_top
;
...
...
@@ -671,6 +667,7 @@ class Ev {
class
EvItemAlarm
{
node
:
PlowNode
;
e
:
MhEvent
;
constructor
(
ev
,
e
,
destination
,
destCode
)
{
this
.
e
=
e
;
...
...
java/jsw/flow/src/flow.html
View file @
867fdfb6
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<head>
<title>
Trace
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
</head>
<body>
<body>
<div
class=
"toolbar"
role=
"toolbar"
>
<div
id=
"toolitem1"
tabindex=
"0"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_graph.png"
><img></div>
<div
id=
"toolitem2"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_navigator.png"
><img></div>
<div
id=
"toolitem3"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_history.png"
><img></div>
<div
id=
"toolitem4"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_object.png"
><img></div>
<div
id=
"toolitem1"
tabindex=
"0"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_graph.png"
/>
</div>
<div
id=
"toolitem2"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_navigator.png"
/>
</div>
<div
id=
"toolitem3"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_history.png"
/>
</div>
<div
id=
"toolitem4"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_object.png"
/>
</div>
</div>
<canvas
id=
"flowcanvas"
width=
"1200"
height=
"800"
></canvas>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
...
...
@@ -19,5 +27,5 @@
<script
type=
"text/babel"
src=
"flow.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
</body>
</html>
java/jsw/flow/src/flow.ts
View file @
867fdfb6
...
...
@@ -220,6 +220,7 @@ class GDraw {
gctx
:
CanvasRenderingContext2D
;
offset_top
:
number
;
offset_left
:
number
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
ctx
=
ctx
;
this
.
canvas
=
document
.
querySelector
(
"
canvas
"
);
...
...
@@ -243,9 +244,9 @@ class GDraw {
class
FlowArray
{
ctx
:
FlowCtx
;
a
:
Array
<
any
>
;
a
=
[];
constructor
(
ctx
:
FlowCtx
)
{
this
.
a
=
[];
this
.
ctx
=
ctx
;
}
...
...
@@ -335,7 +336,7 @@ class FlowArray {
this
.
a
.
push
(
arrow
);
break
;
case
Save
.
Point
:
let
point
=
new
FlowPoint
(
this
.
ctx
);
let
point
=
new
FlowPoint
();
i
=
point
.
open
(
lines
,
i
+
1
);
this
.
a
.
push
(
point
);
break
;
...
...
@@ -372,13 +373,12 @@ class FlowArray {
class
FlowNodeClass
{
ctx
:
FlowCtx
;
a
:
FlowArray
;
nc_name
:
string
;
group
:
number
;
nc_name
=
""
;
group
=
0
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
a
=
new
FlowArray
(
ctx
);
this
.
ctx
=
ctx
;
this
.
nc_name
=
""
;
this
.
group
=
0
;
}
draw
(
g
,
p
,
node
,
highlight
)
{
...
...
@@ -424,25 +424,17 @@ class FlowNodeClass {
class
FlowConClass
{
ctx
:
FlowCtx
;
cc_name
:
string
;
con_type
:
number
;
corner
:
number
;
draw_type
:
number
;
line_width
:
number
;
arrow_width
:
number
;
arrow_length
:
number
;
round_corner_amount
:
number
;
group
:
number
;
cc_name
=
""
;
con_type
=
0
;
corner
=
0
;
draw_type
=
0
;
line_width
=
0
;
arrow_width
=
0.0
;
arrow_length
=
0.0
;
round_corner_amount
=
0.0
;
group
=
0
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
cc_name
=
""
;
this
.
con_type
=
0
;
this
.
corner
=
0
;
this
.
draw_type
=
0
;
this
.
line_width
=
0
;
this
.
arrow_width
=
0.0
;
this
.
arrow_length
=
0.0
;
this
.
round_corner_amount
=
0.0
;
this
.
group
=
0
;
this
.
ctx
=
ctx
;
}
...
...
@@ -498,14 +490,8 @@ class FlowConClass {
}
class
FlowPoint
{
ctx
:
FlowCtx
;
x
:
number
;
y
:
number
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
x
=
0.0
;
this
.
y
=
0.0
;
this
.
ctx
=
ctx
;
}
x
=
0.0
;
y
=
0.0
;
open
(
lines
,
row
)
{
let
i
;
...
...
@@ -513,10 +499,6 @@ class FlowPoint {
let
tokens
=
lines
[
i
].
split
(
'
'
);
let
key
=
parseInt
(
tokens
[
0
]);
if
(
this
.
ctx
.
debug
)
{
console
.
log
(
"
point :
"
+
lines
[
i
]);
}
switch
(
key
)
{
case
Save
.
Point
:
break
;
...
...
@@ -539,15 +521,12 @@ class FlowPoint {
class
FlowLine
{
ctx
:
FlowCtx
;
p1
:
FlowPoint
;
p2
:
FlowPoint
;
draw_type
:
DrawType
;
line_width
:
number
;
p1
=
new
FlowPoint
();
p2
=
new
FlowPoint
();
draw_type
:
DrawType
=
0
;
line_width
=
0
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
p1
=
new
FlowPoint
(
ctx
);
this
.
p2
=
new
FlowPoint
(
ctx
);
this
.
draw_type
=
0
;
this
.
line_width
=
0
;
this
.
ctx
=
ctx
;
}
...
...
@@ -637,19 +616,14 @@ class FlowLine {
class
FlowRect
{
ctx
:
FlowCtx
;
ll
:
FlowPoint
;
ur
:
FlowPoint
;
draw_type
:
DrawType
;
line_width
:
number
;
display_level
:
DisplayLevel
;
fill
:
number
;
ll
=
new
FlowPoint
();
ur
=
new
FlowPoint
();
draw_type
:
DrawType
=
0
;
line_width
=
0
;
display_level
:
DisplayLevel
=
0
;
fill
=
0
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
ll
=
new
FlowPoint
(
ctx
);
this
.
ur
=
new
FlowPoint
(
ctx
);
this
.
draw_type
=
0
;
this
.
line_width
=
0
;
this
.
display_level
=
0
;
this
.
fill
=
0
;
this
.
ctx
=
ctx
;
}
...
...
@@ -731,19 +705,14 @@ class FlowRect {
class
FlowArc
{
ctx
:
FlowCtx
;
ll
:
FlowPoint
;
ur
:
FlowPoint
;
angle1
:
number
;
angle2
:
number
;
draw_type
:
DrawType
;
line_width
:
number
;
ll
=
new
FlowPoint
();
ur
=
new
FlowPoint
();
angle1
=
0.0
;
angle2
=
0.0
;
draw_type
:
DrawType
=
0
;
line_width
=
0
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
ll
=
new
FlowPoint
(
ctx
);
this
.
ur
=
new
FlowPoint
(
ctx
);
this
.
angle1
=
0.0
;
this
.
angle2
=
0.0
;
this
.
draw_type
=
0
;
this
.
line_width
=
0
;
this
.
ctx
=
ctx
;
}
...
...
@@ -818,15 +787,12 @@ class FlowArc {
class
FlowText
{
ctx
:
FlowCtx
;
p
:
FlowPoint
;
draw_type
:
DrawType
;
text_size
:
number
;
text
:
string
;
p
=
new
FlowPoint
();
draw_type
:
DrawType
=
0
;
text_size
=
0
;
text
=
""
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
p
=
new
FlowPoint
(
ctx
);
this
.
draw_type
=
0
;
this
.
text_size
=
0
;
this
.
text
=
""
;
this
.
ctx
=
ctx
;
}
...
...
@@ -917,21 +883,15 @@ class FlowText {
class
FlowArrow
{
ctx
:
FlowCtx
;
p1
:
FlowPoint
;
p2
:
FlowPoint
;
p_dest
:
FlowPoint
;
arrow_width
:
number
;
arrow_length
:
number
;
draw_type
:
DrawType
;
line_width
:
number
;
p1
=
new
FlowPoint
();
p2
=
new
FlowPoint
();
p_dest
=
new
FlowPoint
();
arrow_width
=
0.0
;
arrow_length
=
0.0
;
draw_type
:
DrawType
=
0
;
line_width
=
0
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
p1
=
new
FlowPoint
(
ctx
);
this
.
p2
=
new
FlowPoint
(
ctx
);
this
.
p_dest
=
new
FlowPoint
(
ctx
);
this
.
arrow_width
=
0.0
;
this
.
arrow_length
=
0.0
;
this
.
draw_type
=
0
;
this
.
line_width
=
0
;
this
.
ctx
=
ctx
;
}
...
...
@@ -1012,6 +972,7 @@ class FlowArrow {
class
FlowTriangle
extends
FlowRect
{
ctx
:
FlowCtx
;
constructor
(
ctx
:
FlowCtx
)
{
super
(
ctx
);
}
...
...
@@ -1091,18 +1052,14 @@ class FlowTriangle extends FlowRect {
class
FlowConPoint
{
ctx
:
FlowCtx
;
p
:
FlowPoint
;
number
:
number
;
direction
:
number
;
trace_attribute
:
string
;
trace_attr_type
:
number
;
p
=
new
FlowPoint
();
number
=
0
;
direction
=
0
;
trace_attribute
=
""
;
trace_attr_type
=
0
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
ctx
=
ctx
;
this
.
p
=
new
FlowPoint
(
ctx
);
this
.
number
=
0
;
this
.
direction
=
0
;
this
.
trace_attribute
=
""
;
this
.
trace_attr_type
=
0
;
}
draw
(
g
,
p
,
node
,
highlight
)
{
...
...
@@ -1149,19 +1106,14 @@ class FlowConPoint {
class
FlowAnnot
{
ctx
:
FlowCtx
;
p
:
FlowPoint
;
draw_type
:
DrawType
;
text_size
:
number
;
display_level
:
DisplayLevel
;
annot_type
:
number
;
number
:
number
;
p
=
new
FlowPoint
();
draw_type
:
DrawType
=
0
;
text_size
=
0
display_level
:
DisplayLevel
=
0
;
annot_type
=
0
;
number
=
0
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
p
=
new
FlowPoint
(
ctx
);
this
.
draw_type
=
0
;
this
.
text_size
=
0
;
this
.
display_level
=
0
;
this
.
annot_type
=
0
;
this
.
number
=
0
;
this
.
ctx
=
ctx
;
}
...
...
@@ -1279,63 +1231,45 @@ class FlowAnnot {
class
FlowCon
{
ctx
:
FlowCtx
;
x_right
:
number
;
x_left
:
number
;
y_high
:
number
;
y_low
:
number
;
cc
:
object
;
p_num
:
number
;
l_num
:
number
;
a_num
:
number
;
arrow_num
:
number
;
ref_num
:
number
;
point_x
:
FlowArray
;
point_y
:
FlowArray
;
line_a
:
FlowArray
;
arc_a
:
FlowArray
;
arrow_a
:
FlowArray
;
ref_a
:
FlowArray
;
c_name
:
string
;
trace_object
:
string
;
trace_attribute
:
string
;
trace_attr_type
:
number
;
temporary_ref
:
number
;
highlight
:
boolean
;
redraw
:
boolean
;
x_right
=
0.0
;
x_left
=
0.0
;
y_high
=
0.0
;
y_low
=
0.0
;
cc
=
null
;
p_num
=
0
;
l_num
=
0
;
a_num
=
0
;
arrow_num
=
0
;
ref_num
=
0
;
c_name
=
""
;
trace_object
=
""
;
trace_attribute
=
""
;
trace_attr_type
=
0
;
temporary_ref
=
0
;
highlight
=
false
;
redraw
=
true
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
ctx
=
ctx
;
this
.
x_right
=
0.0
;
this
.
x_left
=
0.0
;
this
.
y_high
=
0.0
;
this
.
y_low
=
0.0
;
this
.
cc
=
null
;
this
.
p_num
=
0
;
this
.
l_num
=
0
;
this
.
a_num
=
0
;
this
.
arrow_num
=
0
;
this
.
ref_num
=
0
;
this
.
point_x
=
new
FlowArray
(
ctx
);
this
.
point_y
=
new
FlowArray
(
ctx
);
this
.
line_a
=
new
FlowArray
(
ctx
);
this
.
arc_a
=
new
FlowArray
(
ctx
);
this
.
arrow_a
=
new
FlowArray
(
ctx
);
this
.
ref_a
=
new
FlowArray
(
ctx
);
this
.
c_name
=
""
;
this
.
trace_object
=
""
;
this
.
trace_attribute
=
""
;
this
.
trace_attr_type
=
0
;
this
.
temporary_ref
=
0
;
this
.
highlight
=
false
;
this
.
redraw
=
true
;
}
draw
(
g
,
p0
,
node
,
highlight
)
{
if
(
!
this
.
redraw
)
{
return
;
}
let
p
=
new
FlowPoint
(
this
.
ctx
);
p
.
x
=
0
;
p
.
y
=
0
;
let
p
=
new
FlowPoint
();
if
(
this
.
temporary_ref
!==
0
||
this
.
cc
.
con_type
===
ConType
.
Reference
)
{
this
.
ref_a
.
draw
(
g
,
p
,
null
,
highlight
);
...
...
@@ -1480,46 +1414,28 @@ class FlowCon {
class
FlowNode
{
ctx
:
FlowCtx
;
x_right
:
number
;
x_left
:
number
;
y_high
:
number
;
y_low
:
number
;
nc
:
FlowNodeClass
;
pos
:
FlowPoint
;
n_name
:
string
;
annotv
:
Array
;
annotsize
:
Array
;
trace_object
:
string
;
trace_attribute
:
string
;
trace_attr_type
:
number
;
highlight
:
boolean
;
select
:
boolean
;
fill_color
:
number
;
p
:
number
;
old_value
:
number
;
first_scan
:
boolean
;
redraw
:
boolean
;
x_right
=
0.0
;
x_left
=
0.0
;
y_high
=
0.0
;
y_low
=
0.0
;
nc
:
FlowNodeClass
=
null
;
pos
=
new
FlowPoint
();
n_name
=
""
;
annotv
:
Array
=
[];
annotsize
:
Array
=
[];
trace_object
=
""
;
trace_attribute
=
""
;
trace_attr_type
=
0
;
highlight
=
false
;
select
=
false
;
fill_color
=
0
;
p
=
0
;
old_value
=
0
;
first_scan
=
true
;
redraw
=
true
;
constructor
(
ctx
:
FlowCtx
)
{
this
.
ctx
=
ctx
;
this
.
x_right
=
0.0
;
this
.
x_left
=
0.0
;
this
.
y_high
=
0.0
;
this
.
y_low
=
0.0
;
this
.
nc
=
null
;
this
.
pos
=
new
FlowPoint
(
ctx
);
this
.
n_name
=
""
;
this
.
annotv
=
[];
this
.
annotsize
=
[];
this
.
trace_object
=
""
;
this
.
trace_attribute
=
""
;
this
.
trace_attr_type
=
0
;
this
.
highlight
=
false
;
this
.
select
=
false
;
this
.
fill_color
=
0
;
this
.
p
=
0
;
this
.
old_value
=
0
;
this
.
first_scan
=
true
;
this
.
redraw
=
true
;
}
draw
(
g
,
p
,
node
,
highlight
)
{
...
...
@@ -1758,41 +1674,29 @@ class FlowNode {
}
class
FlowCtx
{
display_level
:
DisplayLevel
;
gdh
:
Gdh
;
debug
:
boolean
;
zoom_factor
:
number
;
base_zoom_factor
:
number
;
offset_x
:
number
;
offset_y
:
number
;
x_right
:
number
;
x_left
:
number
;
y_high
:
number
;
y_low
:
number
;
a
:
FlowArray
;
a_nc
:
FlowArray
;
a_cc
:
FlowArray
;
name
:
string
;
gdraw
:
GDraw
;
select_object
:
FlowNode
;
display_level
=
DisplayLevel
.
One
;
gdh
:
Gdh
=
null
;
debug
=
false
;
zoom_factor
=
20.0
;
base_zoom_factor
=
20.0
;
offset_x
=
0
;
offset_y
=
0
;
x_right
=
0.0
;
x_left
=
0.0
;
y_high
=
0.0
;
y_low
=
0.0
;
name
=
"
Claes context
"
;
select_object
:
FlowNode
=
null
;
constructor
()
{
this
.
display_level
=
DisplayLevel
.
One
;
this
.
gdh
=
null
;
this
.
debug
=
false
;
this
.
zoom_factor
=
20.0
;
this
.
base_zoom_factor
=
20.0
;
this
.
offset_x
=
0
;
this
.
offset_y
=
0
;
this
.
x_right
=
0.0
;
this
.
x_left
=
0.0
;
this
.
y_high
=
0.0
;
this
.
y_low
=
0.0
;
this
.
a
=
new
FlowArray
(
this
);
this
.
a_nc
=
new
FlowArray
(
this
);
this
.
a_cc
=
new
FlowArray
(
this
);
this
.
name
=
"
Claes context
"
;
this
.
gdraw
=
new
GDraw
(
this
);
this
.
select_object
=
null
;
}
draw
()
{
...
...
@@ -1939,13 +1843,11 @@ class FlowCtx {
class
FlowFrame
{
ctx
:
FlowCtx
;
timer
:
number
;
vars_object
:
string
;
timer
:
number
=
null
;
vars_object
:
string
=
null
;
constructor
()
{
this
.
ctx
=
new
FlowCtx
();
this
.
timer
=
null
;
console
.
log
(
"
ctx:
"
,
this
.
ctx
);
this
.
vars_object
=
null
;
}
readFlowWeb
(
fname
,
read_cb
)
{
...
...
@@ -2008,12 +1910,7 @@ class FlowFrame {
this
.
ctx
.
offset_y
-=
this
.
ctx
.
y_low
*
this
.
ctx
.
zoom_factor
;
this
.
ctx
.
draw
();
console
.
log
(
"
New Gdh
"
);
this
.
ctx
.
gdh
=
new
Gdh
();
this
.
ctx
.
gdh
.
open_cb
=
this
.
flow_open
;
this
.
ctx
.
gdh
.
close_cb
=
this
.
flow_close
;
console
.
log
(
"
ctx.gdh
"
,
this
.
ctx
.
gdh
);
this
.
ctx
.
gdh
.
init
();
this
.
ctx
.
gdh
=
new
Gdh
(
this
.
flow_open
,
this
.
flow_close
);
if
(
this
.
vars_object
!==
null
)
{
let
o
=
this
.
ctx
.
search_object
(
this
.
vars_object
);
...
...
java/jsw/ge/src/ge.html
View file @
867fdfb6
<!DOCTYPE html>
<html>
<head>
<head>
<title>
Ge graph
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
</head>
<body>
<body>
<canvas
id=
"flowcanvas"
width=
"1200"
height=
"800"
></canvas>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
<script
type=
"text/babel"
src=
"pwr.js"
></script>
...
...
@@ -65,5 +65,5 @@
<script
type=
"text/babel"
src=
"ge_appl.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
</body>
</html>
java/jsw/ge/src/ge_appl.ts
View file @
867fdfb6
...
...
@@ -14,6 +14,7 @@ let cliTable = [new CliTable("OPEN",
class
Appl
{
graph
:
Graph
;
constructor
()
{
this
.
graph
=
new
Graph
(
this
);
}
...
...
java/jsw/ge/src/ge_dyn.ts
View file @
867fdfb6
...
...
@@ -8319,6 +8319,7 @@ class DynInputFocus extends DynElem {
action
(
o
,
e
)
{
return
1
;
}
open
(
lines
,
row
)
{
let
i
;
for
(
i
=
row
;
i
<
lines
.
length
;
i
++
)
{
...
...
java/jsw/ge/src/ge_graph.ts
View file @
867fdfb6
...
...
@@ -27,9 +27,11 @@ class LocalSub {
ref
()
{
this
.
refCount
++
;
}
unref
()
{
this
.
refCount
--
;
}
getRefCount
()
{
return
this
.
refCount
;
}
...
...
@@ -235,6 +237,7 @@ class Graph {
priv
=
0
;
timer
:
number
;
frame
:
GrowFrame
;
constructor
(
appl
)
{
this
.
appl
=
appl
;
if
(
typeof
InstallTrigger
!==
'
undefined
'
)
{
...
...
@@ -268,9 +271,7 @@ class Graph {
this
.
ctx
.
traceConnect
();
this
.
trace_cyclic
();
}
else
{
this
.
gdh
=
new
Gdh
();
this
.
gdh
.
open_cb
=
this
.
gdh_init_cb
;
this
.
gdh
.
init
();
this
.
gdh
=
new
Gdh
(
this
.
gdh_init_cb
);
}
}
...
...
@@ -303,6 +304,7 @@ class Graph {
this
.
gdh
.
getRefObjectInfoAll
(
this
.
trace_scan
);
}
}
trace_scan
(
id
,
sts
)
{
this
.
scan_time
=
this
.
ctx
.
scantime
;
this
.
fast_scan_time
=
this
.
ctx
.
fast_scantime
;
...
...
@@ -713,9 +715,11 @@ class Graph {
getLdb
()
{
return
this
.
ldb
;
}
getGdh
()
{
return
this
.
gdh
;
}
isAuthorized
(
access
)
{
return
!!
(
this
.
priv
&
access
);
// return appl.isAuthorized( access);
...
...
@@ -769,11 +773,13 @@ class Graph {
this
.
ctxPush
();
}
}
traceDisconnect
(
o
)
{
if
(
o
.
userdata
!==
null
)
{
o
.
userdata
.
disconnect
(
o
);
}
}
traceScan
(
o
)
{
if
(
o
.
userdata
!==
null
)
{
let
dyn
=
o
.
userdata
;
...
...
java/jsw/opwind/src/crypt.ts
View file @
867fdfb6
java/jsw/opwind/src/opwind.html
View file @
867fdfb6
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<head>
<title>
Operator window
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
<style>
.menu
{
float
:
left
;
width
:
20%
;
height
:
100%
;
float
:
left
;
width
:
20%
;
height
:
100%
;
}
.main
{
float
:
left
;
width
:
79%
;
height
:
100%
;
float
:
left
;
width
:
79%
;
height
:
100%
;
}
</style>
</head>
</head>
<body>
<body>
<iframe
class=
"menu"
src=
"opwind_menu.html"
></iframe>
<iframe
class=
"main"
src=
"xtt_help_index.html"
></iframe>
</body>
</body>
</html>
java/jsw/opwind/src/opwind.ts
View file @
867fdfb6
"
use strict
"
;
class
OpWindMenu
{
priv
:
number
;
user
:
string
;
user_text
:
Text
;
priv
=
0
;
user
=
""
;
user_text
:
Text
=
null
;
host
:
string
;
gdh
:
Gdh
;
info
:
OpwindMenuInfo
;
constructor
()
{
this
.
priv
=
0
;
this
.
user
=
""
;
this
.
user_text
=
null
;
this
.
host
=
window
.
location
.
hostname
;
if
(
this
.
host
===
""
)
{
this
.
host
=
"
localhost
"
;
}
this
.
gdh
=
new
Gdh
();
this
.
gdh
.
open_cb
=
this
.
gdh_init_cb
;
this
.
gdh
.
init
();
this
.
gdh
=
new
Gdh
(
this
.
gdh_init_cb
);
}
is_authorized
(
access
)
{
...
...
@@ -46,7 +42,7 @@ class OpWindMenu {
button
.
type
=
"
button
"
;
button
.
className
=
"
leftmenu-button
"
;
button
.
value
=
text
;
button
.
addEventListener
(
'
click
'
,
function
()
{
button
.
addEventListener
(
'
click
'
,
function
()
{
menu
.
button_cb
(
button
.
value
);
});
context
.
appendChild
(
button
);
...
...
java/jsw/opwind/src/opwind_menu.html
View file @
867fdfb6
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<head>
<title>
Operator Menu
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
</head>
<body>
<body>
<div
id=
"opwindmenu"
width=
"120"
height=
"800"
>
<h1
id=
"opwind_title"
></h1>
<p
id=
"opwind_text"
></p>
<hr>
<button
id=
"login_button"
type=
"button"
class=
"leftmenu-button"
>
Login
</button>
<div
id=
"login_frame"
class=
"login-frame"
>
Username
<br>
<input
id=
"login_user"
name=
"username"
class=
"login-field"
/><br>
Password
<br>
<input
id=
"login_passw"
name=
"password"
type=
"password"
class=
"login-field"
/><br>
<div
id=
"login_frame"
class=
"login-frame"
>
Username
<br>
<input
id=
"login_user"
name=
"username"
class=
"login-field"
/><br>
Password
<br>
<input
id=
"login_passw"
name=
"password"
type=
"password"
class=
"login-field"
/><br>
<button
id=
"apply_button"
type=
"button"
style=
"flex-grow:1"
>
Apply
</button>
<button
id=
"cancel_button"
type=
"button"
style=
"float:right"
>
Cancel
</button><br>
<button
id=
"cancel_button"
type=
"button"
style=
"float:right"
>
Cancel
</button>
<br>
<button
id=
"logout_button"
type=
"button"
class=
"leftmenu-button"
>
Logout
</button>
</div>
</div>
...
...
@@ -28,5 +27,5 @@
<script
type=
"text/babel"
src=
"opwind.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
</body>
</html>
java/jsw/xtt/src/xtt.html
View file @
867fdfb6
<!DOCTYPE html>
<html>
<head>
<head>
<title>
Xtt
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"toolbar.css"
>
</head>
</head>
<body>
<body>
<div
class=
"toolbar"
role=
"toolbar"
>
<div
id=
"toolitem1"
tabindex=
"0"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_graph.png"
><img></div>
<div
id=
"toolitem2"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_objectgraph.png"
><img></div>
<div
id=
"toolitem3"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_plc.png"
><img></div>
<div
id=
"toolitem4"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_history.png"
><img></div>
<div
id=
"toolitem5"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_object.png"
><img></div>
<div
id=
"toolitem6"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_crossref.png"
><img></div>
<div
id=
"toolitem7"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_help.png"
><img></div>
<div
id=
"toolitem8"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
><img
src=
"toolbar_classhelp.png"
><img></div>
<div
id=
"toolitem1"
tabindex=
"0"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_graph.png"
/>
</div>
<div
id=
"toolitem2"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_objectgraph.png"
/>
</div>
<div
id=
"toolitem3"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_plc.png"
/>
</div>
<div
id=
"toolitem4"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_history.png"
/>
</div>
<div
id=
"toolitem5"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_object.png"
/>
</div>
<div
id=
"toolitem6"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_crossref.png"
/>
</div>
<div
id=
"toolitem7"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_help.png"
/>
</div>
<div
id=
"toolitem8"
tabindex=
"-1"
class=
"toolbar-item"
role=
"button"
>
<img
src=
"toolbar_classhelp.png"
/>
</div>
</div>
<canvas
id=
"flowcanvas"
width=
"1200"
height=
"800"
></canvas>
<script
src=
"https://unpkg.com/@babel/standalone/babel.min.js"
></script>
...
...
@@ -25,5 +41,5 @@
<script
type=
"text/babel"
src=
"xtt.ts"
></script>
<hr>
<address><a
href=
"mailto:claes@debian86.ssab.com"
></a></address>
</body>
</body>
</html>
java/jsw/xtt/src/xtt.ts
View file @
867fdfb6
...
...
@@ -3,6 +3,7 @@
class
XttOpenChildrenData
{
node
:
PlowNode
;
open_next
:
PlowNode
;
constructor
(
node
,
open_next
)
{
this
.
node
=
node
;
this
.
open_next
=
open_next
;
...
...
@@ -10,13 +11,13 @@ class XttOpenChildrenData {
}
class
Xtt
{
ncObject
:
PlowNodeClass
;
ncObject
:
PlowNodeClass
=
null
;
scan_update
:
boolean
;
priv
:
number
;
ctx
:
PlowCtx
;
timer
:
number
;
timer
=
null
;
constructor
()
{
this
.
ncObject
=
null
;
this
.
priv
=
Number
(
sessionStorage
.
getItem
(
"
pwr_privilege
"
));
console
.
log
(
"
pwr_privilege
"
,
this
.
priv
);
...
...
@@ -25,9 +26,7 @@ class Xtt {
this
.
ctx
.
event_cb
=
this
.
plow_event
;
this
.
createNodeClasses
();
this
.
ctx
.
gdh
=
new
Gdh
();
this
.
ctx
.
gdh
.
open_cb
=
this
.
gdh_init_cb
;
this
.
ctx
.
gdh
.
init
();
this
.
ctx
.
gdh
=
new
Gdh
(
this
.
gdh_init_cb
);
this
.
ctx
.
gdraw
.
canvas
.
addEventListener
(
"
click
"
,
function
(
event
)
{
let
y
=
event
.
pageY
-
this
.
ctx
.
gdraw
.
offset_top
;
...
...
@@ -591,6 +590,7 @@ class XttItemObject {
full_name
:
string
;
has_children
:
boolean
;
node
:
PlowNode
;
constructor
(
xtt
,
object_info
,
destination
,
destCode
)
{
this
.
objid
=
object_info
.
objid
;
this
.
cid
=
object_info
.
cid
;
...
...
@@ -690,6 +690,7 @@ class XttItemAttr {
firstScan
:
boolean
;
old_value
:
number
;
node
:
PlowNode
;
constructor
(
xtt
,
info
,
destination
,
destCode
)
{
this
.
name
=
info
.
name
;
this
.
objid
=
info
.
objid
;
...
...
@@ -807,6 +808,7 @@ class XttItemAttrArray {
size
:
number
;
elements
:
number
;
node
:
PlowNode
;
constructor
(
xtt
,
info
,
destination
,
destCode
)
{
this
.
name
=
info
.
name
;
this
.
objid
=
info
.
objid
;
...
...
@@ -882,6 +884,7 @@ class XttItemAttrObject {
flags
:
number
;
size
:
number
;
node
:
PlowNode
;
constructor
(
xtt
,
info
,
destination
,
destCode
)
{
this
.
name
=
info
.
name
;
this
.
classname
=
info
.
classname
;
...
...
@@ -941,6 +944,7 @@ class XttItemCrr {
objid
:
PwrtObjid
;
type
:
number
;
node
:
PlowNode
;
constructor
(
xtt
,
info
,
destination
,
destCode
)
{
this
.
name
=
info
.
name
;
this
.
classname
=
info
.
classname
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment