Skip to content

Commit

Permalink
Move logic of avoid click to the first click.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Mantilla committed Feb 3, 2014
1 parent 9bcc472 commit bc2ee5a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/js/cdl.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

// Background.
background = svgContainer.append('rect')
.attr('id', 'backgroud')
.attr('id', 'background')
.attr('width', width)
.attr('height', height)
.style('fill', 'transparent')
Expand Down Expand Up @@ -274,6 +274,11 @@
* @param node
*/
click: function(node) {
// If root element, do not perform any action.
if (node.depth === 0) {
return;
}

var nodeSelected;

// Start click node event.
Expand Down Expand Up @@ -321,11 +326,6 @@
* @param node
*/
secondClick: function(node) {
// If root element, do not perform any action.
if (node.depth === 0) {
return;
}

// If it's chronological node, go up until the parent not chronological and set like active node.
while (node.type === 'chronological') {
node = node.parent;
Expand Down

0 comments on commit bc2ee5a

Please sign in to comment.