Browse Source

update dependencylibs

Robin Herbots 9 years ago
parent
commit
67b8f42bd4

+ 1 - 1
extra/dependencyLibs/inputmask.dependencyLib.jqlite.js

@@ -10,7 +10,7 @@
 	} else if (typeof exports === "object") {
 		module.exports = factory(require("jqlite"));
 	} else {
-		factory(jQuery);
+		factory(jqlite);
 	}
 }
 (function ($) {

+ 14 - 1
extra/dependencyLibs/inputmask.dependencyLib.js

@@ -89,6 +89,14 @@
 		}
 	}
 
+	function getWindow(elem) {
+		return isWindow(elem) ?
+			elem :
+			elem.nodeType === 9 ?
+			elem.defaultView || elem.parentWindow :
+				false;
+	}
+
 	DependencyLib.prototype = {
 		on: function (events, handler) {
 			if (isValidElement(this[0])) {
@@ -248,7 +256,12 @@
 			return this;
 		},
 		position: function () {
-			alert("todo");
+			if (isValidElement(this[0])) {
+				return {
+					top: this[0].offsetTop,
+					left: this[0].offsetLeft
+				};
+			}
 		}
 	};