reimplement feature 'encoded url' (#16)
change symbol names for better readability beautify location-sidebar cleanup sourcecode * change symbols to unicode-names * reimplement feature 'encoded url'
This commit is contained in:
parent
51c1c57e48
commit
8497a5f833
@ -57,7 +57,7 @@ function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Legend, Linklist,
|
|||||||
contentDiv.appendChild(buttons)
|
contentDiv.appendChild(buttons)
|
||||||
|
|
||||||
var buttonToggle = document.createElement("button")
|
var buttonToggle = document.createElement("button")
|
||||||
buttonToggle.textContent = ""
|
buttonToggle.textContent = "\uF133"
|
||||||
buttonToggle.onclick = function () {
|
buttonToggle.onclick = function () {
|
||||||
if (content.constructor === Map)
|
if (content.constructor === Map)
|
||||||
router.view("g")
|
router.view("g")
|
||||||
|
@ -18,7 +18,7 @@ define(["map/clientlayer", "map/labelslayer",
|
|||||||
|
|
||||||
onAdd: function () {
|
onAdd: function () {
|
||||||
var button = L.DomUtil.create("button", "add-layer")
|
var button = L.DomUtil.create("button", "add-layer")
|
||||||
button.textContent = ""
|
button.textContent = "\uF2C7"
|
||||||
|
|
||||||
// L.DomEvent.disableClickPropagation(button)
|
// L.DomEvent.disableClickPropagation(button)
|
||||||
// Click propagation isn't disabled as this causes problems with the
|
// Click propagation isn't disabled as this causes problems with the
|
||||||
@ -46,7 +46,7 @@ define(["map/clientlayer", "map/labelslayer",
|
|||||||
|
|
||||||
onAdd: function () {
|
onAdd: function () {
|
||||||
var button = L.DomUtil.create("button", "locate-user")
|
var button = L.DomUtil.create("button", "locate-user")
|
||||||
button.textContent = ""
|
button.textContent = "\uF2E9"
|
||||||
|
|
||||||
L.DomEvent.disableClickPropagation(button)
|
L.DomEvent.disableClickPropagation(button)
|
||||||
L.DomEvent.addListener(button, "click", this.onClick, this)
|
L.DomEvent.addListener(button, "click", this.onClick, this)
|
||||||
@ -85,7 +85,7 @@ define(["map/clientlayer", "map/labelslayer",
|
|||||||
|
|
||||||
onAdd: function () {
|
onAdd: function () {
|
||||||
var button = L.DomUtil.create("button", "coord-picker")
|
var button = L.DomUtil.create("button", "coord-picker")
|
||||||
button.textContent = ""
|
button.textContent = "\uF2A6"
|
||||||
|
|
||||||
// Click propagation isn't disabled as this causes problems with the
|
// Click propagation isn't disabled as this causes problems with the
|
||||||
// location picking mode; instead propagation is stopped in onClick().
|
// location picking mode; instead propagation is stopped in onClick().
|
||||||
|
@ -78,6 +78,8 @@ define(function () {
|
|||||||
if (!s)
|
if (!s)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
s = decodeURIComponent(s)
|
||||||
|
|
||||||
if (!s.startsWith("#!"))
|
if (!s.startsWith("#!"))
|
||||||
return false
|
return false
|
||||||
|
|
||||||
@ -94,7 +96,7 @@ define(function () {
|
|||||||
var id
|
var id
|
||||||
|
|
||||||
if (args[0] === "n") {
|
if (args[0] === "n") {
|
||||||
id = decodeURIComponent(args[1])
|
id = args[1]
|
||||||
if (id in objects.nodes) {
|
if (id in objects.nodes) {
|
||||||
currentObject = { node: objects.nodes[id] }
|
currentObject = { node: objects.nodes[id] }
|
||||||
gotoNode(objects.nodes[id])
|
gotoNode(objects.nodes[id])
|
||||||
@ -103,7 +105,7 @@ define(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args[0] === "l") {
|
if (args[0] === "l") {
|
||||||
id = decodeURIComponent(args[1])
|
id = args[1]
|
||||||
if (id in objects.links) {
|
if (id in objects.links) {
|
||||||
currentObject = { link: objects.links[id] }
|
currentObject = { link: objects.links[id] }
|
||||||
gotoLink(objects.links[id])
|
gotoLink(objects.links[id])
|
||||||
|
Loading…
Reference in New Issue
Block a user