Skip to main content
Question

How to resize Sticky via API?

  • May 13, 2023
  • 2 replies
  • 469 views

Tone_Xu

Hi, I am trying to create some STICKY of different width and height (not 200X200) using API for my widget.

As suggested in StickyNode | Plugin API, width and height of sticky are all [read only] and I should use resize method. So my code was sticky.resize(item.width, item.height); but I got an error message Property 'resize' does not exist on type 'StickyNode'.

Also on Shared Node Properties | Plugin API , neither “resize” nor " resizeWithoutConstraints" section on this page did not include stickyNodes.

Could people advise? Thank you!

This topic has been closed for replies.

2 replies

Tone_Xu
  • Author
  • May 13, 2023

*typo correction: neither those sections included StickyNodes


Tone_Xu
  • Author
  • May 24, 2023

I got the answer from here that you could do sth like sticky.isWideWidth = true; to set up rectangular sticky notes, but this method had not been documented in the API doc.