Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Max Mecklin
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7ea72516
authored
Dec 04, 2014
by
Antti Jaakkola
Committed by
Tuomas Riihimäki
Dec 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
little improvemet to seatmap.js
1 parent
dbd51a4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
code/moya-web/WebContent/resources/seatjs/seatmap.js
code/moya-web/WebContent/resources/seatjs/seatmap.js
View file @
7ea7251
...
@@ -250,11 +250,16 @@ function placemap(opts)
...
@@ -250,11 +250,16 @@ function placemap(opts)
}
}
function
draw_places
(
data
)
function
draw_places
(
data
,
full
)
{
{
full_data
=
false
;
if
(
full
===
true
||
full
===
false
)
{
full_data
=
full
;
}
// TODO: update functionality!
// TODO: update functionality!
var
places
=
map_layer
.
selectAll
(
"rect"
)
var
places
=
map_layer
.
selectAll
(
"rect"
)
.
data
(
data
,
function
(
d
)
{
return
d
.
id
;
}).
enter
()
.
data
(
data
,
function
(
d
)
{
return
d
.
id
;
});
places
.
enter
()
.
append
(
"rect"
)
.
append
(
"rect"
)
.
filter
(
function
(
d
,
i
){
return
d
.
state
!=
"D"
;
})
.
filter
(
function
(
d
,
i
){
return
d
.
state
!=
"D"
;
})
.
attr
(
"x"
,
function
(
d
,
i
)
{
return
d
.
x
;
})
.
attr
(
"x"
,
function
(
d
,
i
)
{
return
d
.
x
;
})
...
@@ -264,18 +269,21 @@ function placemap(opts)
...
@@ -264,18 +269,21 @@ function placemap(opts)
.
attr
(
"id"
,
function
(
d
)
{
return
d
.
id
;
})
.
attr
(
"id"
,
function
(
d
)
{
return
d
.
id
;
})
.
style
(
"fill"
,
place_color
)
.
style
(
"fill"
,
place_color
)
.
style
(
'stroke'
,
'#101010'
)
.
style
(
'stroke'
,
'#101010'
)
.
style
(
'stroke-width'
,
'1'
);
.
style
(
'stroke-width'
,
'1'
)
places
.
append
(
"title"
,
function
(
d
,
i
)
{
return
d
.
name
;
});
.
append
(
"title"
,
function
(
d
,
i
)
{
return
d
.
name
;
});
places
var
old_places
=
map_layer
.
selectAll
(
"rect"
)
.
data
(
data
,
function
(
d
)
{
return
d
.
id
;
})
.
filter
(
function
(
d
,
i
){
return
d
.
state
!=
"D"
;
})
.
attr
(
"x"
,
function
(
d
,
i
)
{
return
d
.
x
;
})
.
attr
(
"x"
,
function
(
d
,
i
)
{
return
d
.
x
;
})
.
attr
(
"y"
,
function
(
d
,
i
)
{
return
d
.
y
;
})
.
attr
(
"y"
,
function
(
d
,
i
)
{
return
d
.
y
;
})
.
attr
(
"width"
,
function
(
d
,
i
)
{
return
d
.
w
;})
.
attr
(
"width"
,
function
(
d
,
i
)
{
return
d
.
w
;})
.
attr
(
"height"
,
function
(
d
,
i
)
{
return
d
.
h
;
})
.
attr
(
"height"
,
function
(
d
,
i
)
{
return
d
.
h
;
})
.
attr
(
"id"
,
function
(
d
)
{
return
d
.
id
;
})
.
attr
(
"id"
,
function
(
d
)
{
return
d
.
id
;
})
.
style
(
"fill"
,
place_color
);
.
style
(
"fill"
,
place_color
)
.
style
(
'stroke'
,
'#101010'
)
.
style
(
'stroke-width'
,
'1'
);
if
(
full_data
==
true
)
{
places
.
exit
().
remove
();
}
places
.
filter
(
function
(
d
,
i
){
return
d
.
state
==
"D"
;
}).
remove
();
if
(
px
.
edit_enabled
==
false
)
if
(
px
.
edit_enabled
==
false
)
{
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment