diff --git a/utils.js b/utils.js
index <HASH>..<HASH> 100644
--- a/utils.js
+++ b/utils.js
@@ -803,8 +803,8 @@ vglModule.utils.createLines = function(positions, colors) {
  * @returns {Array}
  */
 //////////////////////////////////////////////////////////////////////////////
-vglModule.utils.createColorLegend = function(varname, lookupTable, width,
-                                             height, origin, countMajor,
+vglModule.utils.createColorLegend = function(varname, lookupTable, origin,
+                                             width, height, countMajor,
                                              countMinor) {
   'use strict';
Improving legend API

Adding ability to set legend position and size for a given layer. Basically
the idea is that the view can have multiple layers each with its own legend.Now
if multiple layers are visible then we want legends not to overlap. Now the
view can find positions and sizes for each layer and run some space resolution
algorithm to make sure that they don't overlap