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) {
// 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
function gui_cord_inspector_new(cid) {
function gui_cord_inspector_new(cid, font_size) {
var g = get_gobj(cid, "cord_inspector"),
ci_rect = create_item(cid, "rect", { id: "cord_inspector_rect" }),
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("");
ci_text.appendChild(text_node);
g.appendChild(ci_rect);
......
......@@ -110,8 +110,8 @@ void magicGlass_drawNew(t_magicGlass *x)
{
gui_vmess("gui_gobj_new", "xssiii",
x->x_c, "cord_inspector", "cord_inspector", 0, 0, 0);
gui_vmess("gui_cord_inspector_new", "x",
x->x_c);
gui_vmess("gui_cord_inspector_new", "xi",
x->x_c, x->x_display_font);
magicGlass_updateText(x, 0);
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