• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Canvas component NumericStepper

New Here ,
Nov 10, 2017 Nov 10, 2017

Copy link to clipboard

Copied

Canvas component NumericStepper

How to set max and min programmatically?

Views

169

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Nov 10, 2017 Nov 10, 2017

$("#InstanceName")[0].min = newMinValue;

$("#InstanceName")[0].max = newMaxValue;

However, these will not take effect if you place the script in the same frame when you add the component.

You'll need to place the script in next frame after adding the component.

Or, you can use it like below, which enforces the above script to be run only in the next frame after adding the component:

this.on("tick", function () {

     $("#InstanceName")[0].min = newMinValue;

     $("#InstanceName")[0].max = newMaxValue

...

Votes

Translate

Translate
Adobe Employee ,
Nov 10, 2017 Nov 10, 2017

Copy link to clipboard

Copied

$("#InstanceName")[0].min = newMinValue;

$("#InstanceName")[0].max = newMaxValue;

However, these will not take effect if you place the script in the same frame when you add the component.

You'll need to place the script in next frame after adding the component.

Or, you can use it like below, which enforces the above script to be run only in the next frame after adding the component:

this.on("tick", function () {

     $("#InstanceName")[0].min = newMinValue;

     $("#InstanceName")[0].max = newMaxValue;

}, this , true);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 10, 2017 Nov 10, 2017

Copy link to clipboard

Copied

LATEST

Thank you very much

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines