Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
フリードローモードでfabricjsを使用する場合、パスをブラッシングできます。描画された直後に、これらのパスへのオブジェクトとして参照を取得する方法はありますか? マウスアップでオブジェクトを取得する例:
canvas.on('mouse:up', function(options) { var lastfreedraw = options.getLastFreeObject(); });
freedrawとイベントに関する情報を考慮して、path:created オブジェクトにサブスクライブすることをお勧めします。何かのようなもの
canvas.on('path:created', function(e){ var your_path = e.path; // ... do something with your path });
すべきです。