client/js/renderer/noderepr.js
changeset 293 fba23fde14ba
parent 284 fa8035885814
child 326 e4afd8643576
--- a/client/js/renderer/noderepr.js	Fri May 16 12:37:51 2014 +0200
+++ b/client/js/renderer/noderepr.js	Fri May 16 14:09:57 2014 +0200
@@ -1,8 +1,8 @@
-/* paper-renderer.js */
-"use strict";
+
 
 define(['jquery', 'underscore', 'requtils', 'renderer/baserepresentation'], function ($, _, requtils, BaseRepresentation) {
-    
+    'use strict';
+
     var Utils = requtils.getUtils();
 
     /* Rkns.Renderer.Node Class */
@@ -82,7 +82,7 @@
 
             var opacity = 1;
             if (this.model.get("delete_scheduled")) {
-                opacity = .5;
+                opacity = 0.5;
                 this.active_buttons = this.pending_delete_buttons;
                 this.circle.dashArray = [2,2];
             } else {
@@ -103,12 +103,12 @@
             }
 
             if (this.node_image) {
-                this.node_image.opacity = this.highlighted ? opacity * .5 : (opacity - .01);
+                this.node_image.opacity = this.highlighted ? opacity * 0.5 : (opacity - 0.01);
             }
 
             this.circle.fillColor = this.highlighted ? this.options.highlighted_node_fill_color : this.options.node_fill_color;
 
-            this.circle.opacity = this.options.show_node_circles ? opacity : .01;
+            this.circle.opacity = this.options.show_node_circles ? opacity : 0.01;
 
             var _text = this.model.get("title") || this.renkan.translate(this.options.label_untitled_nodes) || "";
             _text = Utils.shortenText(_text, this.options.node_label_max_length);
@@ -202,9 +202,9 @@
                             var res = parseFloat(v),
                             isY = k % 2;
                             if (isY) {
-                                res = ( res - .5 ) * height;
+                                res = ( res - 0.5 ) * height;
                             } else {
-                                res = ( res - .5 ) * width;
+                                res = ( res - 0.5 ) * width;
                             }
                             if (relative) {
                                 res += lastCoords[isY];
@@ -268,7 +268,7 @@
                 _raster.locked = true; // Disable mouse events on icon
                 if (hasClipPath) {
                     _raster = new paper.Group(_clip, _raster);
-                    _raster.opacity = .99;
+                    _raster.opacity = 0.99;
                     /* This is a workaround to allow clipping at group level
                      * If opacity was set to 1, paper.js would merge all clipping groups in one (known bug).
                      */
@@ -278,7 +278,7 @@
                 if (this.options.clip_node_images) {
                     var _circleClip = new paper.Path.Circle(centerPoint, baseRadius);
                     _raster = new paper.Group(_circleClip, _raster);
-                    _raster.opacity = .99;
+                    _raster.opacity = 0.99;
                     _raster.clipped = true;
                     _circleClip.__representation = this;
                 }
@@ -325,7 +325,7 @@
             if (_uri) {
                 $('.Rk-Bin-Item').each(function() {
                     var _el = $(this);
-                    if (_el.attr("data-uri") == _uri) {
+                    if (_el.attr("data-uri") === _uri) {
                         _el.addClass("selected");
                     }
                 });
@@ -417,8 +417,7 @@
             }
         }
     });
-    
+
     return NodeRepr;
-    
+
 });
-