Skip to content

Commit

Permalink
for ChangeRegions, CopyRegions, GetRegions, RemoveRegions, SelectRegi…
Browse files Browse the repository at this point in the history
…ons:

  -- region arg defaults to "selected" if selected regions exist, else "all"
  -- previously it only defaulted to "all"
  -- controlled by JS9.globalOpts.regWhichDefault: "auto" or "all"
  • Loading branch information
ericmandel committed Aug 17, 2020
1 parent b06f6c4 commit 38d6382
Show file tree
Hide file tree
Showing 4 changed files with 187 additions and 194 deletions.
37 changes: 26 additions & 11 deletions help/publicapi.html
Original file line number Diff line number Diff line change
Expand Up @@ -3482,8 +3482,10 @@ <h5 id="JS9.GetRegions">Get information about one or more regions</h5>
<li><b>rarr</b>: array of region objects (or text if opts.format is "text")
</ul>
<p>
If the <b>regions</b> argument is not specified, it defaults to "all". You
can specify regions using any of the following:
Get information about one or more regions.
If the <b>regions</b> argument is not specified, it defaults to
"selected" if there are selected regions, otherwise "all".
You can specify regions using any of the following:
<ul>
<li><b>all</b>: all regions not including child text regions
<li><b>All</b>: all regions including child text regions
Expand Down Expand Up @@ -3650,8 +3652,9 @@ <h5 id="JS9.ChangeRegions">Change one or more regions</h5>
<li><b>opts</b>: object containing options to change in each region
</ul>
Change one or more regions.
If the <b>regions</b> argument is not specified, it defaults to "all". You
can specify a region selector using any of the following:
If the <b>regions</b> argument is not specified, it defaults to
"selected" if there are selected regions, otherwise "all".
You can specify a region selector using any of the following:
<ul>
<li><b>all</b>: all regions not including child text regions
<li><b>All</b>: all regions including child text regions
Expand Down Expand Up @@ -3688,8 +3691,9 @@ <h5 id="JS9.CopyRegions">Copy one or more regions to another image</h5>
Copy regions to a different image. If <b>to</b> is "all", then the regions are
copied to all images.
<p>
If the <b>regions</b> argument is not specified, it defaults to "all". You
can specify a region selector using any of the following:
If the <b>regions</b> argument is not specified, it defaults to
"selected" if there are selected regions, otherwise "all".
You can specify a region selector using any of the following:
<ul>
<li><b>all</b>: all regions not including child text regions
<li><b>All</b>: all regions including child text regions
Expand All @@ -3714,9 +3718,10 @@ <h5 id="JS9.RemoveRegions">Remove one or more regions from the region layer</h5>
<ul>
<li><b>regions</b>: which regions to remove
</ul>
The selected regions are removed. If the <b>regions</b> argument is
not specified, it defaults to "all". You can specify a region selector
using any of the following:
The selected regions are removed.
If the <b>regions</b> argument is not specified, it defaults to
"selected" if there are selected regions, otherwise "all".
You can specify a region selector using any of the following:
<ul>
<li><b>all</b>: all regions not including child text regions
<li><b>All</b>: all regions including child text regions
Expand Down Expand Up @@ -3860,7 +3865,8 @@ <h5 id="JS9.SelectRegions">Group Regions into a Selection</h5>

<p>
If the <b>regions</b> argument is not specified, it defaults to
"all". You can specify a selector using any of the following:
"selected" if there are selected regions, otherwise "all".
You can specify a selector using any of the following:
<ul>
<li><b>all</b>: all regions not including child text regions
<li><b>All</b>: all regions including child text regions
Expand Down Expand Up @@ -5757,6 +5763,15 @@ <h4 id="history">API Change History</h4>
The JS9 Public API is meant to be stable and well-documented. If we are
forced to make an incompatible change to the API, it will be documented here.

<p>
<h5>20200815: ChangeRegions, CopyRegions, GetRegions, RemoveRegions, SelectRegions, : default region changed</h5>
If the <b>regions</b> argument is not specified, it now defaults to
"selected" if there are selected regions, otherwise "all". Previously it only
default to "all". You can revert to the previous behavior by changing the
JS9.globalOpts.regWhichDefault from "auto" to "all". (Note: unless you are
writing a GUI, you almost certainly should be specifying the regions explicitly
for these calls).

<p>
<h5>20200720: ChangeRegions: dx, dy properties renamed to deltax, deltay</h5>

Expand Down Expand Up @@ -5851,7 +5866,7 @@ <h5>20141028: callback function to RunAnalysis and SubmitAnalysis</h5>

<p><hr><p>

<h5>Last updated: February 3, 2020</h5>
<h5>Last updated: August 17, 2020</h5>
</div>

</body>
Expand Down
Loading

0 comments on commit 38d6382

Please sign in to comment.