-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getViewArea is returning a useless value #324
Comments
Worse than that, it doesn't have a default and so produces an error if no parameter is given. |
on it |
setting the defaults to pixels if no parameter is given |
Fixed. So this: results now to: offsetX=0; offsetY=0; width=886; height=616 |
Fix in #325 |
Fix is now correctly setting a default for pixels (true) if not given and allows to return Json or String property list with delimiter |
Great — Good job! |
Shouldn't there be an X and Y value, unless you never moved your viewport from the starting 0,0. |
there is, called offsetX and offsetY? |
Output Line 2 and 4 use "grid". Is the height and width in grid squares? I assumed "grid" was just for the offset and the height and width would always be in pixels. I guess grid would be okay for those too. Anyway, Line 4 seems to have pixels rather than grid values. Not sure which one is supposed to be right (2 or 4). |
I did not change the calculation of the values, just the output format. But your right, some lines seem to be not using grid. Checking |
Re the x,y thing above. If you redo your test output I recommend moving the viewport for some x,y contrast. ie offsetX pixel 0 is the same as offsetX grid 0. |
Default pixels: [r: getViewArea()] Results: Default pixels: offsetX=133; offsetY=116; width=886; height=616 |
Fix #324 getViewArea was returning an wrong formatted string.
It appears that the macro function getViewArea is return a string containing the Java object representation. If I do this:
I get this returned:
Which I cannot do much with directly. I have to parse it somehow to extract the relevant values. It would be much preferable to have the method return a json object.
Edit: This is in 1.5.rc.4.
The text was updated successfully, but these errors were encountered: