|
|
@@ -31,7 +31,8 @@ trait DrawImage
|
|
|
$items = (function () use ($items, $img, $array) {
|
|
|
$heightScale = $img->getHeight() / $array['height'];
|
|
|
$weightScale = $img->getWidth() / $array['width'];
|
|
|
- foreach ($items as $key => &$item) {
|
|
|
+// foreach ($items as $key => &$item) {
|
|
|
+ foreach ($items as &$item) {
|
|
|
if (array_key_exists('width', $item)) $item['width'] = intval($weightScale * floatval($item['width']));
|
|
|
if (array_key_exists('height', $item)) $item['height'] = intval($heightScale * floatval($item['height']));
|
|
|
if (array_key_exists('left', $item)) $item['left'] = intval($weightScale * floatval($item['left']));
|