pixolith / fabricjs-customise-controls-extension

Customise the Icon/Cursor/Action of the fabric.js controls
275 stars 100 forks source link

Can't custom the controls for specify object? #70

Closed GreatAuk closed 5 years ago

GreatAuk commented 5 years ago
const text = new fabric.Text(...)
text.customiseControls(...)

Get a error: Uncaught TypeError: text.customiseControls is not a function

MDSLKTR commented 5 years ago

Hey there,

customiseControls extends the Canvas prototype not the Object prototype and therefore can only be applied to your canvas instance (see: https://github.com/pixolith/fabricjs-customise-controls-extension#customising-the-controls). You can use customiseCornerIcons on your text object though.

Regards, Simon

GreatAuk commented 5 years ago

@

Hey there,

customiseControls extends the Canvas prototype not the Object prototype and therefore can only be applied to your canvas instance (see: https://github.com/pixolith/fabricjs-customise-controls-extension#customising-the-controls). You can use customiseCornerIcons on your text object though.

Regards, Simon

Thank you for your reply👍