Commit 145332b9 authored by user's avatar user
Browse files

resize message box after text is updated

parent acc6c2f7
......@@ -143,7 +143,7 @@ var canvas_events = (function() {
evt.stopPropagation();
evt.preventDefault();
},
text_mousemove: function(evt) { // we may not need this one
text_mousemove: function(evt) {
evt.stopPropagation();
//evt.preventDefault();
return false;
......@@ -282,10 +282,9 @@ var canvas_events = (function() {
this.text();
document.removeEventListener("mousedown", events.text_mousedown, false);
document.removeEventListener("mouseup", events.text_mouseup, false);
document.removeEventListener("mousemove", events.text_mousemove, false);
document.removeEventListener("keypress", events.text_keypress, false);
document.removeEventListener("mousemove", events.text_mousemove, false);
document.addEventListener("click", events.floating_text_click, false);
document.addEventListener("keypress", events.floating_text_keypress, false);
document.addEventListener("mousemove", events.mousemove, false);
},
......
......@@ -1730,6 +1730,7 @@ function init_socket_events () {
client.on('data', function(data) {
var dataStr = decoder.write(data);
//var dataStr = data.toString();
// For debugging the buffer...
//if (decoder.end() !== "") {
// console.log("utf8 multi-byte character split across buffer");
......
......@@ -179,3 +179,17 @@ Everything else: (A [x] means we've fixed it)
Crashers
--------
***
Differences in Purrd and Pd
---------------------------
When editing box content, you cannot currently trigger xlet highlight when
mousing over xlets. This is a consequence of the current iteration of moving
gui behavior from the core to the GUI.
When editing box content, the text will wrap if it gets close to the right
border of the window. (Probably same for the bottom of the window.) But
when you activate the box the svg text still gets rendered in the correct
location. (I see this as an improvement over the old behavior.)
......@@ -389,7 +389,14 @@ static void rtext_senditup(t_rtext *x, int action, int *widthp, int *heightp,
// canvas, x->x_tag, outchars_b, tempbuf);
gui_vmess("gui_text_set", "xss", canvas, x->x_tag, tempbuf);
if (pixwide != x->x_drawnwidth || pixhigh != x->x_drawnheight)
// We add the check for T_MESSAGE below so that the box border
// gets resized correctly using our interim event handling in
// pd_canvas.html. I could remove the conditional, but
// this part of Pd is convoluted enough that I'm not sure
// if there'd be any side effects.
if (pixwide != x->x_drawnwidth ||
pixhigh != x->x_drawnheight ||
x->x_text->te_type == T_MESSAGE)
text_drawborder(x->x_text, x->x_glist, x->x_tag,
pixwide, pixhigh, 0);
if (x->x_active)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment