Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabGUI.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
processes
LabGUI.jl
Commits
b8c7d965
Commit
b8c7d965
authored
Mar 14, 2018
by
Jacob Wikmark
Browse files
Options
Downloads
Patches
Plain Diff
some fixes for easier use
parent
1b69871e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/construct.jl
+1
-2
1 addition, 2 deletions
src/construct.jl
src/svg_helper.jl
+3
-1
3 additions, 1 deletion
src/svg_helper.jl
with
4 additions
and
3 deletions
src/construct.jl
+
1
−
2
View file @
b8c7d965
export
@construct
export
@construct
function
make_widget
(
binding
)
function
make_widget
(
binding
)
if
binding
.
head
!=
:
(
=
)
if
binding
.
head
!=
:
(
=
)
error
(
"@construct syntax error."
)
error
(
"@construct syntax error."
)
...
@@ -17,7 +16,7 @@ end
...
@@ -17,7 +16,7 @@ end
function
map_block
(
block
,
symbols
)
function
map_block
(
block
,
symbols
)
lambda
=
Expr
(
:
(
->
),
Expr
(
:
tuple
,
symbols
...
),
lambda
=
Expr
(
:
(
->
),
Expr
(
:
tuple
,
symbols
...
),
block
)
block
)
:
(
map
(
$
lambda
,
$
(
map
(
s
->:
(
observe
(
$
s
)),
symbols
)
...
)))
:
(
map
(
$
lambda
,
$
(
map
(
s
->:
(
InteractNext
.
observe
(
$
s
)),
symbols
)
...
)))
end
end
function
symbols
(
bindings
)
function
symbols
(
bindings
)
...
...
This diff is collapsed.
Click to expand it.
src/svg_helper.jl
+
3
−
1
View file @
b8c7d965
#Provides some routines for easier svg construction, along with some
#Provides some routines for easier svg construction, along with some
#(hopefully!) sane defaults
#(hopefully!) sane defaults
export
svg_rect
,
svg_circle
,
svg_line
,
svg_polyline
,
svg_polygon
,
svg_text
,
default_height
,
default_width
,
default_posy
,
default_posx
,
s_black
,
s_red
,
s_green
,
s_blue
,
stdstyle
,
stdattr
,
svgsvg_symb
export
svg_rect
,
svg_circle
,
svg_line
,
svg_polyline
,
svg_polygon
,
svg_text
,
default_height
,
default_width
,
default_posy
,
default_posx
,
s_black
,
s_red
,
s_green
,
s_blue
,
stdstyle
,
stdattr
,
svgsvg_symb
,
s_color
global
const
default_height
=
900
global
const
default_height
=
900
global
const
default_width
=
600
global
const
default_width
=
600
global
const
default_posy
=
0
global
const
default_posy
=
0
...
@@ -21,6 +21,8 @@ global const stdstyle = Dict(:fill => "rgb$s_black")
...
@@ -21,6 +21,8 @@ global const stdstyle = Dict(:fill => "rgb$s_black")
global
const
svgsvg_symb
=
instanceof
(
dom
"svg:svg"
())
global
const
svgsvg_symb
=
instanceof
(
dom
"svg:svg"
())
s_color
(
color
)
=
Dict
(
:
fill
=>
"rgb
$
(Int.(floor.(color)))"
)
####################
####################
function
svg_rect
(
width
,
height
,
x
=
0
,
y
=
0
,
style
=
stdstyle
)
function
svg_rect
(
width
,
height
,
x
=
0
,
y
=
0
,
style
=
stdstyle
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment