Unable to apply JqueryUI Resizable AspectRatio after initialization?

后端 未结 4 2029
生来不讨喜
生来不讨喜 2021-02-14 11:55

I was trying to turn the aspect ratios on/off dynamically in JQueryUI resizable, however even after setting the option to false, it keeps maintaining the aspect ratio. Below is

4条回答
  •  时光取名叫无心
    2021-02-14 12:34

    This worked for me with no patching

    $('#resizable')
      .resizable('option', 'aspectRatio', false)
      .data('uiResizable')._aspectRatio = false;
    

    This part .data('uiResizable')._aspectRatio = false; comes to the rescue

提交回复
热议问题