Created
August 12, 2017 04:28
-
-
Save cimfalab/f8929bdb634030aba4aa94d9fbb1f004 to your computer and use it in GitHub Desktop.
popup.alignment.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_getAlignment: function() { | |
var ar, align; | |
if ( this.options.align ) { | |
ar = this.options.align.split( "," ); | |
} | |
if ( ar && ar.length > 0 ) { | |
align = { | |
x: parseFloat( ar[ 0 ] ), | |
y: ar.length > 1 ? parseFloat( ar[ 1 ] ) : align.x | |
}; | |
} | |
if ( align && !( isNaN( align.x ) || isNaN( align.y ) ) ) { | |
return { | |
x: this._alignmentToCoeffs( align.x ), | |
y: this._alignmentToCoeffs( align.y ) | |
}; | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment