• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

5monkeys / djedi-cms / 389 / 20
97%
master: 96%

Build:
Build:
LAST BUILD BRANCH: ci/djedi-react-release-workflow
DEFAULT BRANCH: master
Ran 18 Feb 2019 10:35AM UTC
Files 44
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Feb 2019 10:17AM UTC coverage: 97.35%. Remained the same
TOXENV=coverage

Pull #50

travis-ci

web-flow
Improve ImageEditor

It's very common to do `img { width: 100%; height: auto; }` to let
images fill out their container. And the image usually has more pixels
in width than the container has in CSS pixels, to look good on high
resolution screens.

Previously, when clicking an image to edit it djedi would immediately
replace the image with a preview – and set `width: ...; height: ...`
with inline style on it to the actual pixel sizes of the image. This
caused images to blow up in size and overflow their containers.

The reason this was done was to simulate cropping. It worked if images
were assumed to be displayed at their "natural" size, but that's rarely
the case.

This commit uses a canvas to simulate the cropping instead, and only
updates the `src` if the images on the page. This allows previewing the
cropping without breaking the page styling/layout.

When doing this, I found _tons_ of little bugs and quirks. So the commit
ended up being a general refactor of the ImageEditor, making it
generally more stable and easier to understand.

I've also moved the Resize tab into the Image tab, since they are
closely related, and since the "Maintain aspect ratio" both affects the
width/height inputs as well as the crop tool. Another reason for doing
this is because I've hidden the "crop" input field, since it wasn't
editable and not useful.
Pull Request #50: Improve ImageEditor

1249 of 1283 relevant lines covered (97.35%)

0.97 hits per line

Source Files on job 389.20 (TOXENV=coverage)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 324
  • Travis Job 389.20
  • f83a7282 on github
  • Prev Job for TOXENV=coverage on images (#387.20)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc