javascript - Canvas fullscreen mode using fabric.js -
i seek utilize fullscreen mode (html5 fullscreen) canvas object of fabric.js.
var canvas = fabriccanvas.getselectionelement(); if(canvas.requestfullscreen) { canvas.requestfullscreen(); } else if(canvas.webkitrequestfullscreen) { canvas.webkitrequestfullscreen(); } else if(canvas.mozrequestfullscreen) { canvas.mozrequestfullscreen(); }
the problem is, events don't work in fullscreen mode. suppose caused using 2 canvases in fabric: lower drawing , upper events. during passing fullscreen mode lower canvas become "upper". also, i've tried:
var canvas = fabriccanvas.getselectionelement();
in case, there events, no visualization. ideas how solve this?
bring container contains both, selection , canvas element fullscreen. not super familiar fabric, seek
var canvas = fabriccanvas.getselectionelement().parentnode; if(canvas.requestfullscreen) { canvas.requestfullscreen(); } else if(canvas.webkitrequestfullscreen) { canvas.webkitrequestfullscreen(); } else if(canvas.mozrequestfullscreen) { canvas.mozrequestfullscreen(); }
there improve way in fabric.js hold of container .parentnode.
javascript html5 canvas fabricjs
No comments:
Post a Comment