Skip to content

Commit

Permalink
Merge pull request #7 from collective/fix-crop-scale
Browse files Browse the repository at this point in the history
Fix crop scale
  • Loading branch information
petschki committed Nov 3, 2023
2 parents b0538ae + b88fa3f commit 91a376d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/collective/tiles/carousel/slides/slide_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def get_tag(self, obj, data):
scale_util = api.content.get_view("images", obj, self.request)
return scale_util.tag(
fieldname="image",
mode=data.get("crop") and "cover" or "keep",
mode="contain" if data.get("crop") else "scale",
scale=(
data.get("image_scale")
if data.get("image_scale", "") != "original"
Expand Down
2 changes: 1 addition & 1 deletion src/collective/tiles/carousel/tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class ISliderTile(Schema):
default="large",
)

crop = schema.Bool(title=_("Crop Images"), required=False, default=True)
crop = schema.Bool(title=_("Crop Images"), required=False, default=False)

image_class = schema.TextLine(
title=_("Image Class"),
Expand Down

0 comments on commit 91a376d

Please sign in to comment.