Browse Source

Renamed "Link" to "Edge" in manipulation menu

v3_develop
jos 10 years ago
parent
commit
9360434678
4 changed files with 14 additions and 12 deletions
  1. +8
    -8
      lib/network/locales.js
  2. +3
    -3
      lib/network/mixins/ManipulationMixin.js
  3. +1
    -0
      lib/shared/Activator.js
  4. +2
    -1
      test/timeline.html

+ 8
- 8
lib/network/locales.js View File

@ -1,14 +1,14 @@
// English // English
exports['en'] = { exports['en'] = {
add: 'Add Node',
edit: 'Edit', edit: 'Edit',
link: 'Add Link',
del: 'Delete selected', del: 'Delete selected',
back: 'Back',
addNode: 'Add Node',
addEdge: 'Add Edge',
editNode: 'Edit Node', editNode: 'Edit Node',
editEdge: 'Edit Edge', editEdge: 'Edit Edge',
back: 'Back',
addDescription: 'Click in an empty space to place a new node.', addDescription: 'Click in an empty space to place a new node.',
linkDescription: 'Click on a node and drag the edge to another node to connect them.',
edgeDescription: 'Click on a node and drag the edge to another node to connect them.',
editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.', editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.',
createEdgeError: 'Cannot link edges to a cluster.', createEdgeError: 'Cannot link edges to a cluster.',
deleteClusterError: 'Clusters cannot be deleted.' deleteClusterError: 'Clusters cannot be deleted.'
@ -18,15 +18,15 @@ exports['en_US'] = exports['en'];
// Dutch // Dutch
exports['nl'] = { exports['nl'] = {
add: 'Node',
edit: 'Wijzigen', edit: 'Wijzigen',
link: 'Link toevoegen',
del: 'Selectie verwijderen', del: 'Selectie verwijderen',
back: 'Terug',
addNode: 'Node toevoegen',
addEdge: 'Link toevoegen',
editNode: 'Node wijzigen', editNode: 'Node wijzigen',
editEdge: 'Link wijzigen', editEdge: 'Link wijzigen',
back: 'Terug',
addDescription: 'Klik op een leeg gebied om een nieuwe node te maken.', addDescription: 'Klik op een leeg gebied om een nieuwe node te maken.',
linkDescription: 'Klik op een node en sleep de link naar een andere node om ze te verbinden.',
edgeDescription: 'Klik op een node en sleep de link naar een andere node om ze te verbinden.',
editEdgeDescription: 'Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.', editEdgeDescription: 'Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.',
createEdgeError: 'Kan geen link maken naar een cluster.', createEdgeError: 'Kan geen link maken naar een cluster.',
deleteClusterError: 'Clusters kunnen niet worden verwijderd.' deleteClusterError: 'Clusters kunnen niet worden verwijderd.'

+ 3
- 3
lib/network/mixins/ManipulationMixin.js View File

@ -91,10 +91,10 @@ exports._createManipulatorBar = function() {
// add the icons to the manipulator div // add the icons to the manipulator div
this.manipulationDiv.innerHTML = "" + this.manipulationDiv.innerHTML = "" +
"<span class='network-manipulationUI add' id='network-manipulate-addNode'>" + "<span class='network-manipulationUI add' id='network-manipulate-addNode'>" +
"<span class='network-manipulationLabel'>"+locale['add'] +"</span></span>" +
"<span class='network-manipulationLabel'>"+locale['addNode'] +"</span></span>" +
"<div class='network-seperatorLine'></div>" + "<div class='network-seperatorLine'></div>" +
"<span class='network-manipulationUI connect' id='network-manipulate-connectNode'>" + "<span class='network-manipulationUI connect' id='network-manipulate-connectNode'>" +
"<span class='network-manipulationLabel'>"+locale['link'] +"</span></span>";
"<span class='network-manipulationLabel'>"+locale['addEdge'] +"</span></span>";
if (this._getSelectedNodeCount() == 1 && this.triggerFunctions.edit) { if (this._getSelectedNodeCount() == 1 && this.triggerFunctions.edit) {
this.manipulationDiv.innerHTML += "" + this.manipulationDiv.innerHTML += "" +
"<div class='network-seperatorLine'></div>" + "<div class='network-seperatorLine'></div>" +
@ -207,7 +207,7 @@ exports._createAddEdgeToolbar = function() {
"<span class='network-manipulationLabel'>" + locale['back'] + " </span></span>" + "<span class='network-manipulationLabel'>" + locale['back'] + " </span></span>" +
"<div class='network-seperatorLine'></div>" + "<div class='network-seperatorLine'></div>" +
"<span class='network-manipulationUI none' id='network-manipulate-back'>" + "<span class='network-manipulationUI none' id='network-manipulate-back'>" +
"<span id='network-manipulatorLabel' class='network-manipulationLabel'>" + locale['linkDescription'] + "</span></span>";
"<span id='network-manipulatorLabel' class='network-manipulationLabel'>" + locale['edgeDescription'] + "</span></span>";
// bind the icon // bind the icon
var backButton = document.getElementById("network-manipulate-back"); var backButton = document.getElementById("network-manipulate-back");

+ 1
- 0
lib/shared/Activator.js View File

@ -73,6 +73,7 @@ Activator.prototype.destroy = function () {
// cleanup hammer instances // cleanup hammer instances
this.hammer = null; this.hammer = null;
this.windowHammer = null; this.windowHammer = null;
// FIXME: cleaning up hammer instances doesn't work (Timeline not removed from memory)
}; };
/** /**

+ 2
- 1
test/timeline.html View File

@ -96,7 +96,8 @@
//min: moment('2013-01-01'), //min: moment('2013-01-01'),
//max: moment('2013-12-31'), //max: moment('2013-12-31'),
//zoomMin: 1000 * 60 * 60 * 24, // 1 day //zoomMin: 1000 * 60 * 60 * 24, // 1 day
zoomMax: 1000 * 60 * 60 * 24 * 30 * 6 // 6 months
zoomMax: 1000 * 60 * 60 * 24 * 30 * 6, // 6 months
clickToUse: true
}; };
console.timeEnd('create dataset'); console.timeEnd('create dataset');

Loading…
Cancel
Save