papyru 2.11.1.dev134__tar.gz → 2.11.1.dev139__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {papyru-2.11.1.dev134/papyru.egg-info → papyru-2.11.1.dev139}/PKG-INFO +1 -1
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/edit_template/xml.py +24 -8
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139/papyru.egg-info}/PKG-INFO +1 -1
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/setup.py +1 -1
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/LICENSE.txt +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/README.md +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/bin/generate_jsonschema.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/__init__.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/auth.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/context.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/__init__.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/component.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/constants.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/edit_template/__init__.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/edit_template/ean.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/edit_template/manufacturer_address.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/edit_template/motive.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/edit_template/render_text.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/edit_template/title.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/resi.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/logger.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/logger_stdout.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/logger_types.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/middleware.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/problem.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/profiler.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/resource.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/serializer.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/stack_context.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/static/__init__.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/static/apps.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/static/urls.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/static/views.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/utils.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/validation.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/varspool/__init__.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/varspool/assets/Job.json +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/varspool/assets/JobStatusHistory.json +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/varspool/command/__init__.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/varspool/command/config.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/varspool/command/types.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/varspool/serializers.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/varspool/types.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/xml_helper.py +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru.egg-info/SOURCES.txt +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru.egg-info/dependency_links.txt +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru.egg-info/requires.txt +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru.egg-info/top_level.txt +0 -0
- {papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/setup.cfg +0 -0
|
@@ -144,21 +144,37 @@ def _place_custom_image(doc: XMLHelper, ph: PlaceholderInfo,
|
|
|
144
144
|
image_info: ImageInfo):
|
|
145
145
|
placement = image_info.placement
|
|
146
146
|
|
|
147
|
+
scale_x = placement.scaled_img_width / image_info.width
|
|
148
|
+
scale_y = placement.scaled_img_height / image_info.height
|
|
149
|
+
|
|
150
|
+
crop = {
|
|
151
|
+
'x': -placement.x_offset / scale_x,
|
|
152
|
+
'y': -placement.y_offset / scale_y,
|
|
153
|
+
'width': placement.container_width / scale_x,
|
|
154
|
+
'height': placement.container_height / scale_y,
|
|
155
|
+
}
|
|
156
|
+
|
|
147
157
|
doc.set_attribute(ph.wrapper, 'viewBox',
|
|
148
|
-
'
|
|
149
|
-
|
|
158
|
+
'%s %s %s %s' % (crop['x'], crop['y'],
|
|
159
|
+
crop['width'], crop['height']))
|
|
150
160
|
|
|
151
161
|
has_xlink = doc.namespace('xlink') is not None
|
|
152
162
|
doc.set_attribute(ph.placeholder,
|
|
153
163
|
'href', image_info.location,
|
|
154
164
|
'xlink' if has_xlink else None)
|
|
155
165
|
|
|
156
|
-
doc.set_attribute(ph.placeholder, 'x', '
|
|
157
|
-
doc.set_attribute(ph.placeholder, 'y', '
|
|
158
|
-
doc.set_attribute(ph.placeholder, 'width', '%s' %
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
166
|
+
doc.set_attribute(ph.placeholder, 'x', '0.0')
|
|
167
|
+
doc.set_attribute(ph.placeholder, 'y', '0.0')
|
|
168
|
+
doc.set_attribute(ph.placeholder, 'width', '%s' % image_info.width)
|
|
169
|
+
doc.set_attribute(ph.placeholder, 'height', '%s' % image_info.height)
|
|
170
|
+
|
|
171
|
+
doc.set_attribute(ph.placeholder, 'bbox',
|
|
172
|
+
'{"x": %s, "y": %s, "width": %s, "height": %s}'
|
|
173
|
+
% (crop['x'], crop['y'],
|
|
174
|
+
crop['width'], crop['height']), 'pap')
|
|
175
|
+
doc.set_attribute(ph.placeholder, 'img-dimensions',
|
|
176
|
+
'{"width": %s, "height": %s}'
|
|
177
|
+
% (image_info.width, image_info.height), 'pap')
|
|
162
178
|
|
|
163
179
|
_set_changed(doc, ph.placeholder)
|
|
164
180
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/edit_template/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{papyru-2.11.1.dev134 → papyru-2.11.1.dev139}/papyru/create_variant/edit_template/render_text.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|