[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/sketch-mode c24d852 2/3: Also rotate bounding-box
From: |
ELPA Syncer |
Subject: |
[elpa] externals/sketch-mode c24d852 2/3: Also rotate bounding-box |
Date: |
Fri, 5 Nov 2021 11:57:25 -0400 (EDT) |
branch: externals/sketch-mode
commit c24d8528831ae1a1efdd07706646e478bdc09664
Author: Daniel Nicolai <dalanicolai@gmail.com>
Commit: Daniel Nicolai <dalanicolai@gmail.com>
Also rotate bounding-box
---
sketch-mode.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sketch-mode.el b/sketch-mode.el
index 0d47c4c..9a8beb1 100644
--- a/sketch-mode.el
+++ b/sketch-mode.el
@@ -366,7 +366,12 @@ If value of variable ‘sketch-show-labels' is ‘layer',
create ..."
(bbox (sketch-bbox-ex-transform (car (dom-by-id sketch-root (car
sketch-selection)))))
(start-coords (cons (nth 0 bbox) (nth 1 bbox)))
(end-coords (cons (nth 2 bbox) (nth 3 bbox))))
- (apply #'svg-rectangle selections `(,@(sketch--rectangle-coords
start-coords end-coords)))
+ (apply #'svg-rectangle selections
+ (append `(,@(sketch--rectangle-coords start-coords end-coords) :id
"bb")
+ (when sketch-selection
+ (let ((tf (dom-attr (car (dom-by-id sketch-svg (car
sketch-selection))) 'transform)))
+ (when tf
+ (list :transform tf))))))
selections))
@@ -1160,6 +1165,9 @@ returned by the function `sketch-parse-transform-string'"
(setf (cl-third (alist-get 'rotate transform)) (cdr pivot)))
(dom-set-attribute object-def
'transform
+ (sketch-format-transform transform))
+ (dom-set-attribute (car (dom-by-id sketch-svg "bb"))
+ 'transform
(sketch-format-transform transform))))
;; (defun sketch-rotate (deg &optional lisp-buffer)