Skip to content
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

strokeWidth handling #426

Merged
merged 4 commits into from
Feb 25, 2021
Merged

strokeWidth handling #426

merged 4 commits into from
Feb 25, 2021

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Feb 19, 2021

This extends PR #409 (@emilroz), so that the Export script handles shape.get('strokeWidth') being a string everywhere.
This PR also fixes the origin of the strokeWidth string...

To test Export Script:

  • See https://merge-ci.openmicroscopy.org/web/figure/file/71026/
  • I created this figure with Line, Rectangle, Ellipse, Arrow and Polygon (and scalebar) all with stroke width of 0.75.
  • Exported the figure to JSON and edited to replace :0.75, with "0.75", everywhere.
  • Created a new figure with this JSON - If you File > Export to JSON you will see this.
  • To test, exported this to PDF and to TIFF.
  • Compare to check they look the same as the original figure.

To test Paste of crop region:

  • Start a new figure (easier)
  • Copy the crop region on one panel (zoomed-in) and Paste to create a new Rectangle ROI on a different Panel.
  • File > Export to JSON and search for 'strokeWidth' to check that the value not a string e.g. it should be "strokeWidth":2 NOT "strokeWidth":"2".

@emilroz
Copy link
Member

emilroz commented Feb 19, 2021

Looks good @will-moore sorry for missing the comments on #409.

@will-moore
Copy link
Member Author

That last commit should also fix the cause of the issue: #427

@snoopycrimecop
Copy link
Member

snoopycrimecop commented Feb 23, 2021

Conflicting PR. Removed from build OMERO-plugins-push#684. See the console output for more details.
Possible conflicts:

--conflicts Conflict resolved in build OMERO-plugins-push#685. See the console output for more details.

@jburel jburel mentioned this pull request Feb 23, 2021
will-moore added a commit to will-moore/figure that referenced this pull request Feb 24, 2021
@jburel
Copy link
Member

jburel commented Feb 24, 2021

Created arrow, lines etc.:

[{"type":"Arrow","x1":338.0859090909091,"x2":546.3331818181819,"y1":365.2540909090909,"y2":225.74863636363636,"strokeWidth":1,"strokeColor":"#FFFFFF","id":-47766722043832940},

@jburel
Copy link
Member

jburel commented Feb 24, 2021

I did not have any strokeWidth when going over the crop test

@jburel
Copy link
Member

jburel commented Feb 24, 2021

The export script test works

@will-moore
Copy link
Member Author

@jburel You tested "Paste of crop region" steps OK? Not sure if you saw "strokeWidth":2?
Is this good to merge or anything else need addressing?

@jburel
Copy link
Member

jburel commented Feb 25, 2021

I did not have any "strokeWidth" in json when running the "Crop" test mentioned in the description. The way I read it I should have strokeWidth

@will-moore
Copy link
Member Author

@jburel. Did you see the Rectangle created when you pasted the Crop region?
Did the JSON have a Rectangle without any "strokeWidth"?

@jburel
Copy link
Member

jburel commented Feb 25, 2021

Ok this is time, it works I must have done something incorrectly

"strokeWidth":1,"type":"Rectangle"

@jburel
Copy link
Member

jburel commented Feb 25, 2021

merging

@jburel jburel merged commit 46a2abd into ome:master Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants