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
nerrons
purr-data
Commits
47eedaa5
Commit
47eedaa5
authored
Jun 14, 2015
by
user
Browse files
fix bug with textarea placement
parent
2fbb26ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
pd/nw/pdgui.js
View file @
47eedaa5
...
...
@@ -3489,15 +3489,17 @@ function select_text(cid, elem) {
function
gui_textarea
(
cid
,
tag
,
x
,
y
,
max_char_width
,
text
,
font_size
,
state
)
{
gui_post
(
"
x/y is
"
+
x
+
'
/
'
+
y
);
gui_post
(
"
state?
"
+
state
);
var
range
;
var
range
,
svg_view
;
if
(
state
!==
0
)
{
var
p
=
patchwin
[
cid
].
window
.
document
.
createElement
(
'
p
'
);
configure_item
(
p
,
{
id
:
'
new_object_textentry
'
});
svg_view
=
patchwin
[
cid
].
window
.
document
.
getElementById
(
'
patchsvg
'
)
.
viewBox
.
baseVal
;
p
.
contentEditable
=
'
true
'
;
p
.
style
.
setProperty
(
'
left
'
,
x
+
'
px
'
);
p
.
style
.
setProperty
(
'
top
'
,
y
+
'
px
'
);
p
.
style
.
setProperty
(
'
left
'
,
(
x
-
svg_view
.
x
)
+
'
px
'
);
p
.
style
.
setProperty
(
'
top
'
,
(
y
-
svg_view
.
y
)
+
'
px
'
);
p
.
style
.
setProperty
(
'
font-size
'
,
font_size
+
'
px
'
);
p
.
style
.
setProperty
(
'
transform
'
,
'
translate(0px, 0px)
'
);
p
.
style
.
setProperty
(
'
max-width
'
,
...
...
pd/src/g_rtext.c
View file @
47eedaa5
...
...
@@ -604,6 +604,9 @@ void rtext_activate(t_rtext *x, int state)
*/
widthspec
=
x
->
x_text
->
te_width
;
// width if any specified
/* we need to get scroll to make sure we've got the
correct bbox for the svg */
canvas_getscroll
(
glist_getcanvas
(
canvas
));
gui_vmess
(
"gui_textarea"
,
"xsiiisii"
,
canvas
,
x
->
x_tag
,
...
...
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