Skip to content

Commit

Permalink
fix: api documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
PurwaShrivastava committed Sep 16, 2024
1 parent 467f2b3 commit cfa628d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
8 changes: 3 additions & 5 deletions docs/scriptappy.json
Original file line number Diff line number Diff line change
Expand Up @@ -4152,8 +4152,8 @@
"slope": {
"description": "The slope for the reference line",
"optional": true,
"defaultValue": "ComponentRefLine~SlopeObject",
"type": "#/definitions/ComponentRefLine/definitions/SlopeObject"
"defaultValue": "ComponentRefLine~Slope",
"type": "#/definitions/ComponentRefLine/definitions/Slope"
}
}
},
Expand Down Expand Up @@ -4286,9 +4286,7 @@
}
}
},
"SlopeObject": {
"kind": "object",
"entries": {
"Slope": {
"value": {
"description": "Slope value",
"optional": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import refLineComponent from './refline';
* }
* slope: {
* value: 0.5,
* label: '0.5'
* }
* }]
* }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function getPosition(scale, value) {
* @property {string} [scale] - Scale to use (if undefined will use normalized value 0-1)
* @property {ComponentRefLine~GenericObject} [line=ComponentRefLine~GenericObject] - The style of the line
* @property {ComponentRefLine~LineLabel} [label=ComponentRefLine~LineLabel] - The label style of the line
* @property {ComponentRefLine~SlopeObject} [slope=ComponentRefLine~SlopeObject] - The slope for the reference line
* @property {ComponentRefLine~Slope} [slope=ComponentRefLine~Slope] - The slope for the reference line
*/

/**
Expand Down Expand Up @@ -127,9 +127,8 @@ function getPosition(scale, value) {
*/

/**
* @typedef {object} ComponentRefLine~SlopeObject
* @typedef {object} ComponentRefLine~Slope
* @property {number} [value=1] - Slope value
* @property {string} [label='1'] - Slope label
*/

const refLineComponent = {
Expand Down
5 changes: 2 additions & 3 deletions packages/picasso.js/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ declare namespace picassojs {
scale?: string;
line?: picassojs.ComponentRefLine.GenericObject;
label?: picassojs.ComponentRefLine.LineLabel;
slope?: picassojs.ComponentRefLine.SlopeObject;
slope?: picassojs.ComponentRefLine.Slope;
};

type LineLabel = {
Expand All @@ -1074,9 +1074,8 @@ declare namespace picassojs {
opacity?: number;
};

type SlopeObject = {
type Slope = {
value?: number;
label?: string;
};

}
Expand Down

0 comments on commit cfa628d

Please sign in to comment.