最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - prevent click and drag multi selection in fabricjs - Stack Overflow

programmeradmin1浏览0评论

How can I disable the click-drag multi selection in fabricjs?

In this image you can see the selection area with a red border:

.jpg

I want to prevent that kind of selection, but still allow single object selections.

How can I disable the click-drag multi selection in fabricjs?

In this image you can see the selection area with a red border:

https://i.sstatic/5olYf.jpg

I want to prevent that kind of selection, but still allow single object selections.

Share Improve this question asked Oct 1, 2014 at 20:05 localhostlocalhost 551 silver badge6 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 9

There is a property on fabric.Canvas objects called selection which controls this group-selection behavior.

var canvas = new fabric.Canvas('c', {width: 500, height: 500, selection: false});

//Or quite simply:
canvas.selection = false;
发布评论

评论列表(0)

  1. 暂无评论