Commit a85a24dc authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix #268: cord inspector regression with font size too large for border

parent 118800e0
...@@ -4198,11 +4198,14 @@ function gui_canvas_redrect_coords(cid, x1, y1, x2, y2) { ...@@ -4198,11 +4198,14 @@ function gui_canvas_redrect_coords(cid, x1, y1, x2, y2) {
// For clarity, this probably shouldn't be a gobj. Also, it might be easier to // For clarity, this probably shouldn't be a gobj. Also, it might be easier to
// make it a div that lives on top of the patchsvg // make it a div that lives on top of the patchsvg
function gui_cord_inspector_new(cid) { function gui_cord_inspector_new(cid, font_size) {
var g = get_gobj(cid, "cord_inspector"), var g = get_gobj(cid, "cord_inspector"),
ci_rect = create_item(cid, "rect", { id: "cord_inspector_rect" }), ci_rect = create_item(cid, "rect", { id: "cord_inspector_rect" }),
ci_poly = create_item(cid, "polygon", { id: "cord_inspector_polygon" }), ci_poly = create_item(cid, "polygon", { id: "cord_inspector_polygon" }),
ci_text = create_item(cid, "text", { id: "cord_inspector_text" }), ci_text = create_item(cid, "text", {
id: "cord_inspector_text",
"font-size": pd_fontsize_to_gui_fontsize(font_size) + "px",
}),
text_node = patchwin[cid].window.document.createTextNode(""); text_node = patchwin[cid].window.document.createTextNode("");
ci_text.appendChild(text_node); ci_text.appendChild(text_node);
g.appendChild(ci_rect); g.appendChild(ci_rect);
......
...@@ -110,8 +110,8 @@ void magicGlass_drawNew(t_magicGlass *x) ...@@ -110,8 +110,8 @@ void magicGlass_drawNew(t_magicGlass *x)
{ {
gui_vmess("gui_gobj_new", "xssiii", gui_vmess("gui_gobj_new", "xssiii",
x->x_c, "cord_inspector", "cord_inspector", 0, 0, 0); x->x_c, "cord_inspector", "cord_inspector", 0, 0, 0);
gui_vmess("gui_cord_inspector_new", "x", gui_vmess("gui_cord_inspector_new", "xi",
x->x_c); x->x_c, x->x_display_font);
magicGlass_updateText(x, 0); magicGlass_updateText(x, 0);
clock_delay(x->x_flashClock, MG_CLOCK_FLASH_DELAY); clock_delay(x->x_flashClock, MG_CLOCK_FLASH_DELAY);
} }
......
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