Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Giulio
purr-data
Commits
972eb666
Commit
972eb666
authored
Mar 12, 2017
by
Jonathan Wilkes
Browse files
fix #280: duplicate messages aren't printed after clearing the console
parent
f366c4cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/nw/pdgui.js
View file @
972eb666
...
...
@@ -501,13 +501,16 @@ var duplicate = 0;
function
do_post
(
string
,
type
)
{
var
myp
,
span
,
text
,
printout
;
current_string
+=
string
;
myp
=
pd_window
.
document
.
getElementById
(
"
p1
"
);
if
(
string
.
slice
(
-
1
)
===
"
\n
"
)
{
if
(
current_string
===
last_string
)
{
last_child
.
textContent
=
"
[
"
+
(
duplicate
+
2
)
+
"
]
"
+
last_string
;
duplicate
++
;
current_string
=
""
;
if
(
myp
.
lastChild
!==
last_child
)
{
myp
.
appendChild
(
last_child
);
}
}
else
{
myp
=
pd_window
.
document
.
getElementById
(
"
p1
"
),
span
=
pd_window
.
document
.
createElement
(
"
span
"
);
if
(
type
)
{
span
.
classList
.
add
(
type
);
...
...
@@ -4475,6 +4478,10 @@ function gui_dropdown_activate(cid, obj_tag, tag, current_index, font_size, stat
.
window
.
document
.
querySelector
(
"
#dropdown_list
"
);
// stick the obj_tag in a data field
select_elem
.
setAttribute
(
"
data-callback
"
,
obj_tag
);
select_elem
.
style
.
setProperty
(
"
max-height
"
,
(
patchwin
[
cid
].
window
.
innerHeight
-
g
.
getBoundingClientRect
().
bottom
-
5
)
+
"
px
"
);
select_elem
.
style
.
setProperty
(
"
display
"
,
"
inline
"
);
select_elem
.
style
.
setProperty
(
"
left
"
,
(
elem_get_coords
(
g
).
x
-
svg_view
.
x
)
+
"
px
"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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