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

Crop page to panels #252

Merged
merged 11 commits into from Jan 22, 2018

Conversation

Projects
None yet
3 participants
@will-moore
Member

will-moore commented Nov 8, 2017

This allows users to crop a figure to fit around panels.
See https://trello.com/c/lx5YoDTH/14-crop-page-to-panels

To test:

  • With several panels on a figure...
  • Choose File -> Paper setup and pick "Crop page around panels" from the Size options.
  • When OK is clicked, the page should be cropped around the panels, with a small margin.
  • This is added to the Undo queue and can be undone/redone in one action.
  • Subsequent editing of page Size should show that we now have a "Custom" size, and can tweak custom size further.
@jburel

This comment has been minimized.

Member

jburel commented Nov 20, 2017

We need to review the board and finish other PRs before moving so we can have a 3.2.0 out

@pwalczysko

This comment has been minimized.

Member

pwalczysko commented Dec 18, 2017

When a figure is cropped around a fairly small image, as described in the header, the pdf created from such figure is not formatted nicely, missing the full title and link (link is curtailed on display, but working when clicked)

screen shot 2017-12-18 at 15 22 18

@pwalczysko

This comment has been minimized.

Member

pwalczysko commented Dec 18, 2017

Other than #252 (comment) the functionality works as described.

@will-moore

This comment has been minimized.

Member

will-moore commented Dec 20, 2017

@pwalczysko PDF page should be improved now.
Also found and fixed another minor bug. To test:

  • After cropping as above, reopen the Paper setup dialog - note the Custom sizes set (in mm).
  • Save the figure, refresh the browser and re-open Paper setup - check that Custom sizes are same.

@jburel jburel added this to the 3.2.0 milestone Jan 4, 2018

@@ -628,6 +631,56 @@
return dpi.toFixed(0);
},
getBoundingBox: function() {

This comment has been minimized.

@jburel

jburel Jan 11, 2018

Member

This method can be removed

@jburel

This comment has been minimized.

Member

jburel commented Jan 11, 2018

  • For small figures the script has improved
    from_script (1).pdf
    but ideally the displayed url should be the figure_id and when the user clicks on it it opens the figure.
    Same for url for the image location

  • The feature should be improved for figure on multiple pages and set it automatically to 1 if it is done on figure with more than one page e.g. user-1 http://web-dev-merge.openmicroscopy.org/figure/file/20503

@will-moore

This comment has been minimized.

Member

will-moore commented Jan 11, 2018

To test last commit:

  • If figure has multiple pages, then 'Crop' option text is now "Crop single page to panels" instead of "Crop page around panels".
  • If the crop option is chosen, the "Number of Pages" field is updated to 1 and clicking "OK" will crop AND set to single page.

I will look at updating PDF handling for small page sizes, but this might be a lot of work and could go in a different PR since it's not directly related to the cropping functionality of this PR.

@jburel

This comment has been minimized.

Member

jburel commented Jan 12, 2018

  • The text of is correctly modified depending on the number of pages
  • if multiple pages, the number of page is correctly set to 1
  • Clicking OK, set the display to 1 page only

@will-moore could you create a card for PDF and small image
and remove the unused method in panel_model.js?

@jburel

This comment has been minimized.

Member

jburel commented Jan 12, 2018

screenshot in help will have to be updated to include the new option.

@will-moore

This comment has been minimized.

Member

will-moore commented Jan 12, 2018

Card for small PDF pages created: https://trello.com/c/WZugztMX/172-small-pdf-info-page-formatting
getBoundingBox() removed above.

@will-moore will-moore referenced this pull request Jan 12, 2018

Merged

Figure 3.2 update #284

@will-moore

This comment has been minimized.

Member

will-moore commented Jan 12, 2018

@jburel jburel merged commit 2632b75 into ome:master Jan 22, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment