<NME> main.js
<BEF> define([

    'dojo/_base/declare',
    'JBrowse/Plugin'
],
   function (
    declare,
    JBrowsePlugin
) {
       return declare(JBrowsePlugin, {
           constructor: function (args) {
               console.log('NeatCanvasFeatures initialized');
           }
       });
   });


        var browser = this.browser;

        this.gradient = 1;
        if(typeof args.gradientFeatures != 'undefined' && args.gradientFeatures == 0) {
            this.gradient = 0;
        }

    segments_renderFeature: function( context, fRect ) {
        //console.log("SegmentsEx.renderFeature fRect ");
    
        if( this.track.displayMode != 'collapsed' )
            context.clearRect( Math.floor(fRect.l), fRect.t, Math.ceil(fRect.w), fRect.h );
        
        //this.renderConnector( context,  fRect );
                var _height = this._getFeatureHeight( viewInfo, subparts[i] );
                if( ! _height )
                    return;
                if( _height != overallHeight )
                    top += Math.round( (overallHeight - _height)/2 );

                var height = _height / 2;
        var height = this._getFeatureHeight( viewInfo, feature );
        if( ! height )
            return;
        if( height != overallHeight )
            top += Math.round( (overallHeight - height)/2 );

        // background
            grd.addColorStop(0.999, bgcolor);

            // Fill with linear 
            context.fillStyle = bgcolor;
           
        }

    /**
     * Given color string in #rrggbb format, shift the color by shift %  ( i.e. .20 is 20% brighter, -.30 is 30% darker.
     * The new string is returned.
     * If color is not in #rrggbb format, just return the original value. 
     */
    box_colorShift: function(color,shift) {
        
    "wheat":"#f5deb3","white":"#ffffff","whitesmoke":"#f5f5f5",
    "yellow":"#ffff00","yellowgreen":"#9acd32"};

    if (typeof colours[colour.toLowerCase()] != 'undefined')
        return colours[colour.toLowerCase()];

    return "#000000";

<MSG> cleanup warnings.
use gradient mappings
<DFF> @@ -33,7 +33,7 @@ return declare( JBrowsePlugin,
         var browser = this.browser;
 
         this.gradient = 1;
-        if(typeof args.gradientFeatures != 'undefined' && args.gradientFeatures == 0) {
+        if(typeof args.gradientFeatures !== 'undefined' && args.gradientFeatures === 0) {
             this.gradient = 0;
         }
 
@@ -71,7 +71,7 @@ return declare( JBrowsePlugin,
     segments_renderFeature: function( context, fRect ) {
         //console.log("SegmentsEx.renderFeature fRect ");
     
-        if( this.track.displayMode != 'collapsed' )
+        if( this.track.displayMode !== 'collapsed' )
             context.clearRect( Math.floor(fRect.l), fRect.t, Math.ceil(fRect.w), fRect.h );
         
         //this.renderConnector( context,  fRect );
@@ -123,7 +123,7 @@ return declare( JBrowsePlugin,
                 var _height = this._getFeatureHeight( viewInfo, subparts[i] );
                 if( ! _height )
                     return;
-                if( _height != overallHeight )
+                if( _height !== overallHeight )
                     top += Math.round( (overallHeight - _height)/2 );
 
                 var height = _height / 2;
@@ -160,7 +160,7 @@ return declare( JBrowsePlugin,
         var height = this._getFeatureHeight( viewInfo, feature );
         if( ! height )
             return;
-        if( height != overallHeight )
+        if( height !== overallHeight )
             top += Math.round( (overallHeight - height)/2 );
 
         // background
@@ -186,7 +186,7 @@ return declare( JBrowsePlugin,
             grd.addColorStop(0.999, bgcolor);
 
             // Fill with linear 
-            context.fillStyle = bgcolor;
+            context.fillStyle = grd;
            
         }
 
@@ -235,7 +235,7 @@ return declare( JBrowsePlugin,
     /**
      * Given color string in #rrggbb format, shift the color by shift %  ( i.e. .20 is 20% brighter, -.30 is 30% darker.
      * The new string is returned.
-     * If color is not in #rrggbb format, just return the original value. 
+     * If color is not in #rrggbb format, just return the original value.
      */
     box_colorShift: function(color,shift) {
         
@@ -345,7 +345,7 @@ function colourNameToHex(colour)  {
     "wheat":"#f5deb3","white":"#ffffff","whitesmoke":"#f5f5f5",
     "yellow":"#ffff00","yellowgreen":"#9acd32"};
 
-    if (typeof colours[colour.toLowerCase()] != 'undefined')
+    if (typeof colours[colour.toLowerCase()] !== 'undefined')
         return colours[colour.toLowerCase()];
 
     return "#000000";

{'commit': 'diff --git a/plugins/NeatCanvasFeatures/js/main.js b/plugins/NeatCanvasFeatures/js/main.js\nindex 74e5b652a..320e7754a 100644\n--- a/plugins/NeatCanvasFeatures/js/main.js\n+++ b/plugins/NeatCanvasFeatures/js/main.js\n@@ -33,7 +33,7 @@ return declare( JBrowsePlugin,\n         var browser = this.browser;\n \n         this.gradient = 1;\n-        if(typeof args.gradientFeatures != \'undefined\' && args.gradientFeatures == 0) {\n+        if(typeof args.gradientFeatures !== \'undefined\' && args.gradientFeatures === 0) {\n             this.gradient = 0;\n         }\n \n@@ -71,7 +71,7 @@ return declare( JBrowsePlugin,\n     segments_renderFeature: function( context, fRect ) {\n         //console.log("SegmentsEx.renderFeature fRect ");\n     \n-        if( this.track.displayMode != \'collapsed\' )\n+        if( this.track.displayMode !== \'collapsed\' )\n             context.clearRect( Math.floor(fRect.l), fRect.t, Math.ceil(fRect.w), fRect.h );\n         \n         //this.renderConnector( context,  fRect );\n@@ -123,7 +123,7 @@ return declare( JBrowsePlugin,\n                 var _height = this._getFeatureHeight( viewInfo, subparts[i] );\n                 if( ! _height )\n                     return;\n-                if( _height != overallHeight )\n+                if( _height !== overallHeight )\n                     top += Math.round( (overallHeight - _height)/2 );\n \n                 var height = _height / 2;\n@@ -160,7 +160,7 @@ return declare( JBrowsePlugin,\n         var height = this._getFeatureHeight( viewInfo, feature );\n         if( ! height )\n             return;\n-        if( height != overallHeight )\n+        if( height !== overallHeight )\n             top += Math.round( (overallHeight - height)/2 );\n \n         // background\n@@ -186,7 +186,7 @@ return declare( JBrowsePlugin,\n             grd.addColorStop(0.999, bgcolor);\n \n             // Fill with linear \n-            context.fillStyle = bgcolor;\n+            context.fillStyle = grd;\n            \n         }\n \n@@ -235,7 +235,7 @@ return declare( JBrowsePlugin,\n     /**\n      * Given color string in #rrggbb format, shift the color by shift %  ( i.e. .20 is 20% brighter, -.30 is 30% darker.\n      * The new string is returned.\n-     * If color is not in #rrggbb format, just return the original value. \n+     * If color is not in #rrggbb format, just return the original value.\n      */\n     box_colorShift: function(color,shift) {\n         \n@@ -345,7 +345,7 @@ function colourNameToHex(colour)  {\n     "wheat":"#f5deb3","white":"#ffffff","whitesmoke":"#f5f5f5",\n     "yellow":"#ffff00","yellowgreen":"#9acd32"};\n \n-    if (typeof colours[colour.toLowerCase()] != \'undefined\')\n+    if (typeof colours[colour.toLowerCase()] !== \'undefined\')\n         return colours[colour.toLowerCase()];\n \n     return "#000000";\n', 'commit_subject': 'cleanup warnings. use gradient mappings', 'repo_name': 'GMOD/jbrowse', 'committer': {'name': 'enuggetry', 'email': '64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@meyao.net', 'time_sec': '1518490389', 'tz_offset': '-480', 'date': {'seconds': '1518490389'}}, 'commit_tree': '1b124c829341849b5bf91f4925cc734be73926bc', 'commit_message': 'cleanup warnings.\nuse gradient mappings', 'language_name': 'Shell', 'license': 'lgpl-2.1', 'hunks': '@@ -33,7 +33,7 @@ return declare( JBrowsePlugin,\n         var browser = this.browser;\n \n         this.gradient = 1;\n-        if(typeof args.gradientFeatures != \'undefined\' && args.gradientFeatures == 0) {\n+        if(typeof args.gradientFeatures !== \'undefined\' && args.gradientFeatures === 0) {\n             this.gradient = 0;\n         }\n \n@@ -71,7 +71,7 @@ return declare( JBrowsePlugin,\n     segments_renderFeature: function( context, fRect ) {\n         //console.log("SegmentsEx.renderFeature fRect ");\n     \n-        if( this.track.displayMode != \'collapsed\' )\n+        if( this.track.displayMode !== \'collapsed\' )\n             context.clearRect( Math.floor(fRect.l), fRect.t, Math.ceil(fRect.w), fRect.h );\n         \n         //this.renderConnector( context,  fRect );\n@@ -123,7 +123,7 @@ return declare( JBrowsePlugin,\n                 var _height = this._getFeatureHeight( viewInfo, subparts[i] );\n                 if( ! _height )\n                     return;\n-                if( _height != overallHeight )\n+                if( _height !== overallHeight )\n                     top += Math.round( (overallHeight - _height)/2 );\n \n                 var height = _height / 2;\n@@ -160,7 +160,7 @@ return declare( JBrowsePlugin,\n         var height = this._getFeatureHeight( viewInfo, feature );\n         if( ! height )\n             return;\n-        if( height != overallHeight )\n+        if( height !== overallHeight )\n             top += Math.round( (overallHeight - height)/2 );\n \n         // background\n@@ -186,7 +186,7 @@ return declare( JBrowsePlugin,\n             grd.addColorStop(0.999, bgcolor);\n \n             // Fill with linear \n-            context.fillStyle = bgcolor;\n+            context.fillStyle = grd;\n            \n         }\n \n@@ -235,7 +235,7 @@ return declare( JBrowsePlugin,\n     /**\n      * Given color string in #rrggbb format, shift the color by shift %  ( i.e. .20 is 20% brighter, -.30 is 30% darker.\n      * The new string is returned.\n-     * If color is not in #rrggbb format, just return the original value. \n+     * If color is not in #rrggbb format, just return the original value.\n      */\n     box_colorShift: function(color,shift) {\n         \n@@ -345,7 +345,7 @@ function colourNameToHex(colour)  {\n     "wheat":"#f5deb3","white":"#ffffff","whitesmoke":"#f5f5f5",\n     "yellow":"#ffff00","yellowgreen":"#9acd32"};\n \n-    if (typeof colours[colour.toLowerCase()] != \'undefined\')\n+    if (typeof colours[colour.toLowerCase()] !== \'undefined\')\n         return colours[colour.toLowerCase()];\n \n     return "#000000";\n', 'addition_count': 7, 'deletion_count': 7, 'src_file': 'a/plugins/NeatCanvasFeatures/js/main.js', 'tgt_file': 'b/plugins/NeatCanvasFeatures/js/main.js', 'file_extension': '.js', 'before_file': 'define([\n\n    \'dojo/_base/declare\',\n    \'JBrowse/Plugin\'\n],\n   function (\n    declare,\n    JBrowsePlugin\n) {\n       return declare(JBrowsePlugin, {\n           constructor: function (args) {\n               console.log(\'NeatCanvasFeatures initialized\');\n           }\n       });\n   });\n\n\n        var browser = this.browser;\n\n        this.gradient = 1;\n        if(typeof args.gradientFeatures != \'undefined\' && args.gradientFeatures == 0) {\n            this.gradient = 0;\n        }\n\n    segments_renderFeature: function( context, fRect ) {\n        //console.log("SegmentsEx.renderFeature fRect ");\n    \n        if( this.track.displayMode != \'collapsed\' )\n            context.clearRect( Math.floor(fRect.l), fRect.t, Math.ceil(fRect.w), fRect.h );\n        \n        //this.renderConnector( context,  fRect );\n                var _height = this._getFeatureHeight( viewInfo, subparts[i] );\n                if( ! _height )\n                    return;\n                if( _height != overallHeight )\n                    top += Math.round( (overallHeight - _height)/2 );\n\n                var height = _height / 2;\n        var height = this._getFeatureHeight( viewInfo, feature );\n        if( ! height )\n            return;\n        if( height != overallHeight )\n            top += Math.round( (overallHeight - height)/2 );\n\n        // background\n            grd.addColorStop(0.999, bgcolor);\n\n            // Fill with linear \n            context.fillStyle = bgcolor;\n           \n        }\n\n    /**\n     * Given color string in #rrggbb format, shift the color by shift %  ( i.e. .20 is 20% brighter, -.30 is 30% darker.\n     * The new string is returned.\n     * If color is not in #rrggbb format, just return the original value. \n     */\n    box_colorShift: function(color,shift) {\n        \n    "wheat":"#f5deb3","white":"#ffffff","whitesmoke":"#f5f5f5",\n    "yellow":"#ffff00","yellowgreen":"#9acd32"};\n\n    if (typeof colours[colour.toLowerCase()] != \'undefined\')\n        return colours[colour.toLowerCase()];\n\n    return "#000000";\n', 'message': 'cleanup warnings.\nuse gradient mappings', 'author_name': 'enuggetry', 'lang': 'js'}