Skip to content

Commit

Permalink
test alt shape icons
Browse files Browse the repository at this point in the history
  • Loading branch information
sprocketc committed Dec 8, 2023
1 parent cb8b287 commit 3fe009b
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 11 deletions.
3 changes: 3 additions & 0 deletions resources/public/icons/circle-alt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/public/icons/ellipse-alt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion resources/public/icons/eye.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/public/icons/line-alt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion resources/public/icons/polyline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/public/icons/rectangle-alt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/renderer/tools/circle.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

(defmethod tools/properties :circle
[]
{:icon "circle"
{:icon "circle-alt"
:description "The <circle> SVG element is an SVG basic shape, used to draw
circles based on a center point and a radius."
:attrs [:stroke-width
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/tools/ellipse.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

(defmethod tools/properties :ellipse
[]
{:icon "ellipse"
{:icon "ellipse-alt"
:description "The <ellipse> element is an SVG basic shape, used to create
ellipses based on a center coordinate, and both their x and
y radius."
Expand Down
13 changes: 7 additions & 6 deletions src/renderer/tools/line.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
(derive :line ::tools/shape)

(defmethod tools/properties :line
[] {:icon "line"
[] {:icon "line-alt"
:description "The <line> element is an SVG basic shape used to create
a line connecting two points."
:attrs [:stroke-width
Expand Down Expand Up @@ -69,11 +69,12 @@
(create-line db))

(defmethod tools/translate :line
[el [x y]] (-> el
(hierarchy/update-attr :x1 + x)
(hierarchy/update-attr :y1 + y)
(hierarchy/update-attr :x2 + x)
(hierarchy/update-attr :y2 + y)))
[el [x y]]
(-> el
(hierarchy/update-attr :x1 + x)
(hierarchy/update-attr :y1 + y)
(hierarchy/update-attr :x2 + x)
(hierarchy/update-attr :y2 + y)))

(defmethod tools/scale :line
[el ratio pivot-point]
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/tools/rect.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

(defmethod tools/properties :rect
[]
{:icon "rectangle"
{:icon "rectangle-alt"
:description "The <rect> element is a basic SVG shape that draws rectangles,
defined by their position, width, and height. The rectangles
may have their corners rounded."
Expand Down

0 comments on commit 3fe009b

Please sign in to comment.