I want to know that, Is it possible to hide text object in canvas using fabric js?
I don't want to remove object, as I need it in further use, so just want to hide it. I searched a lot, but didn't work anything.
Here is my code of fabric js.
var text = new fabric.Text("test", {
fontFamily: 'Times new roman',
fontSize: fabric.util.parseUnit(fontSize),
left: (startPosition.x + pointer.x) / 2,
top: ((startPosition.y + pointer.y) / 2) + 10,
slope: ((startPosition.y - pointer.y) / (startPosition.x - pointer.x)),
originX: 'center',
originY: 'center',
});
canvas.add(text);
//canvas.getObjects(text).style.display = "none";
//text.prop.hide();
//text.hide = function () {
//text.set({
// css: {"display":"none"},
// selectable: false
// });
//};
All suggestions are exceptable.