Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

441
Views
Fabric.js disable object selection but enable target find?

I want to let all fabric canvas objects could be detected on mouse move, but cannot be click or select.

if (isHoverMode == true) {
  canvas.selection = false
  canvas.skipTargetFind = true  // <-this cause object could be selectable!
  canvas.on('mouse:over', function(e) {
      // do something on e.target ...
  });
}

It turns out that canvas.skipTargetFind must set to true in order to have mouse:over event to work. But then the objects could also be selected.

How could I prevent object to be selectable?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The object property you're looking for is selectable.

Use it like this for a single object:

obj.set('selectable', false);

Or like this for all objects:

fabric.Object.prototype.selectable = false;

See http://fabricjs.com/docs/fabric.Object.html#selectable

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!