1
1
Fork 0
mirror of https://gitlab.com/Oreolek/cloak-salet.git synced 2024-06-26 03:50:51 +03:00

Clickable map

This commit is contained in:
Alexander Yakovlev 2017-07-21 13:34:19 +07:00
parent 7df1387bc8
commit dfe1c39845

View file

@ -42,16 +42,11 @@ $(document).ready(() ->
$("#night").addClass("active")
window.night = true
)
$("body").on("click", "#storytab", (event) ->
event.preventDefault()
if not salet.here().canSave
salet.goBack()
return false
)
$("body").on("click", ".tab", (event) ->
if (event.target.id == "storytab")
return true
switchTab(event.target.id)
if (event.target.id == "storytab")
if not salet.here().canSave
salet.goBack()
return true
)
TogetherJS.config("ignoreForms", true)
@ -248,12 +243,13 @@ sysroom "map",
})
rooms.push(way)
delta++
globx = globx + 2
globy = globy + 2
console.log data
globy = globy - 2
s = new sigma({
graph: data,
container: 'map'
})
console.log(s)
s.bind('clickNode', (e) ->
switchTab('storytab')
salet.goTo(e.data.node.id)
)
return ""