浏览代码

Move prototype method declaration outside of function scope

Cosmin Stamate 6 年之前
父节点
当前提交
578e355b90
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      js/inputmask.js

+ 3 - 4
js/inputmask.js

@@ -633,6 +633,9 @@ Inputmask.prototype = {
         }
         // console.log(JSON.stringify(maskTokens));
         return maskTokens;
+    },
+    positionColorMask: function (input, template) {
+        input.style.left = template.offsetLeft + "px";
     }
 };
 
@@ -2809,10 +2812,6 @@ function maskScope(actionObj, maskset, opts) {
         });
     }
 
-    Inputmask.prototype.positionColorMask = function (input, template) {
-        input.style.left = template.offsetLeft + "px";
-    }
-
     function renderColorMask(input, caretPos, clear) {
         var maskTemplate = [],
             isStatic = false,