Created
November 8, 2012 16:56
-
-
Save davestewart/4040049 to your computer and use it in GitHub Desktop.
xJSFL inspection of an Arial 40px static textfield containing Hello There
This file contains hidden or 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
// init | |
xjsfl.init(this); | |
clear(); | |
// get the first element | |
var obj = $('*').get(0); | |
// inspect properties | |
inspect(obj.objectSpaceBounds, 'objectSpaceBounds') | |
inspect(Utils.getValues(obj, ['x', 'y', 'width', 'height', 'matrix'], 1), '[x, y, width, height, matrix]') | |
inspect($dom.getSelectionRect(), 'document.getSelectionRect()') | |
// results | |
objectSpaceBounds: Object (depth:4, objects:0, values:4, time:0.0 seconds) | |
-------------------------------------------------------------------------------- | |
object => Object | |
left: -1.999 | |
top: -1.999 | |
right: 195.65 | |
bottom: 46.7 | |
[x, y, width, height, matrix]: Object (depth:4, objects:1, values:10, time:0.0 seconds) | |
--------------------------------------------------------------------------------------- | |
object => Object | |
x: 2 | |
y: 2 | |
width: 197.65 | |
height: 48.7 | |
[matrix] => Object | |
a: 1 | |
b: 0 | |
c: 0 | |
d: 1 | |
tx: 2 | |
ty: 2 | |
document.getSelectionRect(): Object (depth:4, objects:0, values:4, time:0.0 seconds) | |
------------------------------------------------------------------------------------ | |
object => Object | |
left: 0 | |
top: 0 | |
right: 197.65 | |
bottom: 48.7 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment