Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Srashti Mittal
purr-data
Commits
e697e70d
Commit
e697e70d
authored
Nov 24, 2020
by
Jonathan Wilkes
Browse files
Merge branch 'fix-my_canvas-anchor-position' into master
parents
3f242c54
70ebbb7e
Changes
1
Show whitespace changes
Inline
Side-by-side
pd/src/g_all_guis.c
View file @
e697e70d
...
...
@@ -897,9 +897,20 @@ void scalehandle_draw_select2(t_iemgui *x)
the one for the label. Special case for [cnv] which for some reason
allows a smaller selection area than its painted rectangle. */
if
(
c
==
my_canvas_class
)
{
/* We're drawing the anchor rectangle by abusing the <line> svg elem
with a width equal to SCALEHANDLE_WIDTH.
This simplifies the CSS, but unfortunately makes the positioning
a little wonky:
For example-- a vertical line from sy to sy+10 with a width of 10
will straddle the horizontal point sx. So to get the leftmost part
of our rect at sx, we multiply the width by 0.5 and add that to sx.
*/
scalehandle_draw_select
(
x
->
x_handle
,
(
int
)(
sx
+
SCALEHANDLE_WIDTH
*
1
.
5
)
+
1
,
sy
+
SCALEHANDLE_HEIGHT
);
(
int
)(
sx
+
SCALEHANDLE_WIDTH
*
0
.
5
)
,
sy
);
}
if
(
x
->
x_lab
!=
s_empty
)
scalehandle_draw_select
(
x
->
x_lhandle
,
x
->
x_ldx
+
5
,
x
->
x_ldy
+
10
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment