Commit 8a625fe8 by Szabolcs Gelencsér

Fix toggle labels in editor

parent d162945d
...@@ -176,7 +176,7 @@ horizon.network_topology = { ...@@ -176,7 +176,7 @@ horizon.network_topology = {
// Shows/Hides graph labels // Shows/Hides graph labels
refresh_labels: function() { refresh_labels: function() {
var show_labels = horizon.cookies.get('show_labels') == 'true'; var show_labels = horizon.cookies.get('show_labels') == true;
angular.element('.nodeLabel').toggle(show_labels); angular.element('.nodeLabel').toggle(show_labels);
}, },
......
...@@ -49,18 +49,18 @@ ...@@ -49,18 +49,18 @@
<script type="text/javascript"> <script type="text/javascript">
{#TODO: real cookie storage#} {#TODO: real cookie storage#}
var cookies = {}
horizon.cookies = { horizon.cookies = {
data: {},
getObject: function (x) { getObject: function (x) {
return cookies[x] return horizon.cookies.data[x]
}, put: function (x, y) { }, put: function (x, y) {
cookies[x] = y horizon.cookies.data[x] = y
}, putObject: function (x, y) { }, putObject: function (x, y) {
cookies[x] = y horizon.cookies.data[x] = y
}, getRaw: function (x) { }, getRaw: function (x) {
return cookies[x] return horizon.cookies.data[x]
}, get: function (x) { }, get: function (x) {
return cookies[x] return horizon.cookies.data[x]
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment