i have come across an annoying bug in my fabric.js-editor:
The selection-box as well as the bounding area (the area you need to click on to select the object) are on the wrong position after changing the font-size of a text-object. (cf. images 1 & 2)
object-selection before:
object-selection after:
I would be very glad if someone knew how to fix this. Thank you!
canvas.on("object:selected", function(options) { document.getElementById("setFontSize").onclick = function handleFontSizeEdit() { canvas.getActiveObject().set("fontSize", document.getElementById("fontSize").value); canvas.renderAll(); }
Font-Size: <input type="text" id="fontSize"> <input type="submit" id="setFontSize" value="Set">
SOLVED
I just realized that i was using an old version of fabric.js (1.1.0), after chanaging it to the current build (1.5) the problem with the selection box disappeared.
In case someone wants to see the code:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.