Skip to content

Commit

Permalink
AXInput, AXSelect windowResize 방식변경 : 정밀도 향상 기대
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasJang committed May 24, 2014
1 parent 4250800 commit c79d51a
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 14 deletions.
18 changes: 17 additions & 1 deletion dist/AXJ.all.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
AXJ - v1.0.4 - 2014-05-23
AXJ - v1.0.4 - 2014-05-24
*/
/* http://www.axisj.com, license : http://www.axisj.com/license */

Expand Down Expand Up @@ -14555,7 +14555,15 @@ var AXInputConverter = Class.create(AXJ, {
init: function () {
axdom(window).resize(this.windowResize.bind(this));
},
windowResize: function () {
var windowResizeApply = this.windowResizeApply.bind(this);
if (this.windowResizeObserver) clearTimeout(this.windowResizeObserver);
this.windowResizeObserver = setTimeout(function () {
windowResizeApply();
}, 10);
},
windowResizeApply: function(){
if (this.windowResizeObserver) clearTimeout(this.windowResizeObserver);
this.alignAllAnchor();
},
alignAllAnchor: function () {
Expand Down Expand Up @@ -21847,7 +21855,15 @@ var AXSelectConverter = Class.create(AXJ, {
this.isMobile = browser.mobile;
axdom(window).resize(this.windowResize.bind(this));
},
windowResize: function () {
var windowResizeApply = this.windowResizeApply.bind(this);
if (this.windowResizeObserver) clearTimeout(this.windowResizeObserver);
this.windowResizeObserver = setTimeout(function () {
windowResizeApply();
}, 10);
},
windowResizeApply: function(){
if (this.windowResizeObserver) clearTimeout(this.windowResizeObserver);
this.alignAllAnchor();
},
alignAllAnchor: function () {
Expand Down
26 changes: 13 additions & 13 deletions dist/AXJ.min.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions lib/AXInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ var AXInputConverter = Class.create(AXJ, {
init: function () {
axdom(window).resize(this.windowResize.bind(this));
},
windowResize: function () {
var windowResizeApply = this.windowResizeApply.bind(this);
if (this.windowResizeObserver) clearTimeout(this.windowResizeObserver);
this.windowResizeObserver = setTimeout(function () {
windowResizeApply();
}, 10);
},
windowResizeApply: function(){
if (this.windowResizeObserver) clearTimeout(this.windowResizeObserver);
this.alignAllAnchor();
},
alignAllAnchor: function () {
Expand Down
8 changes: 8 additions & 0 deletions lib/AXSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ var AXSelectConverter = Class.create(AXJ, {
this.isMobile = browser.mobile;
axdom(window).resize(this.windowResize.bind(this));
},
windowResize: function () {
var windowResizeApply = this.windowResizeApply.bind(this);
if (this.windowResizeObserver) clearTimeout(this.windowResizeObserver);
this.windowResizeObserver = setTimeout(function () {
windowResizeApply();
}, 10);
},
windowResizeApply: function(){
if (this.windowResizeObserver) clearTimeout(this.windowResizeObserver);
this.alignAllAnchor();
},
alignAllAnchor: function () {
Expand Down

0 comments on commit c79d51a

Please sign in to comment.