Sha256: 1e3845d5c7bb3e7b6132ae5fe586b289b8e136f2aa90017b63f480951ffbd724
Contents?: true
Size: 858 Bytes
Versions: 7
Compression:
Stored size: 858 Bytes
Contents
/* --- script: Drag.Limits.js description: A set of function to easily cap Drag's limit license: MIT-style license. requires: - More/Drag provides: [Drag.Limits] ... */ Drag.implement({ setMaxX: function(x) { var limit = this.options.limit; limit.x[1] = x//Math.max(x, limit.x[1]); limit.x[0] = Math.min(limit.x[0], limit.x[1]); }, setMaxY: function(y) { var limit = this.options.limit; limit.y[1] = y//Math.max(y, limit.y[1]); limit.y[0] = Math.min(limit.y[0], limit.y[1]); }, setMinX: function(x) { var limit = this.options.limit; limit.x[0] = x//Math.min(x, limit.x[0]); limit.x[1] = Math.max(limit.x[1], limit.x[0]); }, setMinY: function(y) { var limit = this.options.limit; limit.y[0] = y//Math.min(y, limit.y[0]); limit.y[1] = Math.max(limit.y[1], limit.y[0]); } });
Version data entries
7 entries across 7 versions & 1 rubygems