Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort default options alphabetically #570

Merged
merged 1 commit into from Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/annotation.js
Expand Up @@ -89,15 +89,15 @@ export default {
},

defaults: {
drawTime: 'afterDatasetsDraw',
dblClickSpeed: 350, // ms
animations: {
numbers: {
properties: ['x', 'y', 'x2', 'y2', 'width', 'height', 'pointX', 'pointY', 'labelX', 'labelY', 'labelWidth', 'labelHeight', 'radius'],
type: 'number'
},
},
clip: true,
dblClickSpeed: 350, // ms
drawTime: 'afterDatasetsDraw',
label: {
drawTime: null
}
Expand Down
16 changes: 8 additions & 8 deletions src/types/box.js
Expand Up @@ -55,15 +55,9 @@ BoxAnnotation.defaults = {
borderDashOffset: 0,
borderJoinStyle: 'miter',
borderRadius: 0,
cornerRadius: undefined, // TODO: v2 remove support for cornerRadius
borderWidth: 1,
cornerRadius: undefined, // TODO: v2 remove support for cornerRadius
display: true,
xMax: undefined,
xMin: undefined,
xScaleID: 'x',
yMax: undefined,
yMin: undefined,
yScaleID: 'y',
label: {
color: 'black',
content: null,
Expand All @@ -83,7 +77,13 @@ BoxAnnotation.defaults = {
xAdjust: 0,
yAdjust: 0,
width: undefined
}
},
xMax: undefined,
xMin: undefined,
xScaleID: 'x',
yMax: undefined,
yMin: undefined,
yScaleID: 'y'
};

BoxAnnotation.defaultRoutes = {
Expand Down
10 changes: 5 additions & 5 deletions src/types/ellipse.js
Expand Up @@ -49,18 +49,18 @@ export default class EllipseAnnotation extends Element {
EllipseAnnotation.id = 'ellipseAnnotation';

EllipseAnnotation.defaults = {
display: true,
adjustScaleRange: true,
borderDash: [],
borderDashOffset: 0,
borderWidth: 1,
display: true,
rotation: 0,
xScaleID: 'x',
xMin: undefined,
xMax: undefined,
yScaleID: 'y',
xMin: undefined,
xScaleID: 'x',
yMax: undefined,
yMin: undefined,
yMax: undefined
yScaleID: 'y'
};

EllipseAnnotation.defaultRoutes = {
Expand Down
22 changes: 11 additions & 11 deletions src/types/line.js
Expand Up @@ -166,11 +166,12 @@ export default class LineAnnotation extends Element {

LineAnnotation.id = 'lineAnnotation';
LineAnnotation.defaults = {
display: true,
adjustScaleRange: true,
borderWidth: 2,
borderDash: [],
borderDashOffset: 0,
borderWidth: 2,
display: true,
endValue: undefined,
label: {
backgroundColor: 'rgba(0,0,0,0.8)',
borderCapStyle: 'butt',
Expand All @@ -194,24 +195,23 @@ LineAnnotation.defaults = {
},
height: undefined,
padding: 6,
xPadding: undefined, // TODO: v2 remove support for xPadding
yPadding: undefined, // TODO: v2 remove support for yPadding
position: 'center',
rotation: 0,
textAlign: 'center',
width: undefined,
xAdjust: 0,
yAdjust: 0
xPadding: undefined, // TODO: v2 remove support for xPadding
yAdjust: 0,
yPadding: undefined, // TODO: v2 remove support for yPadding
},
value: undefined,
endValue: undefined,
scaleID: undefined,
xScaleID: 'x',
xMin: undefined,
value: undefined,
xMax: undefined,
yScaleID: 'y',
xMin: undefined,
xScaleID: 'x',
yMax: undefined,
yMin: undefined,
yMax: undefined
yScaleID: 'y'
};

LineAnnotation.defaultRoutes = {
Expand Down
2 changes: 1 addition & 1 deletion src/types/point.js
Expand Up @@ -24,11 +24,11 @@ export default class PointAnnotation extends Element {
PointAnnotation.id = 'pointAnnotation';

PointAnnotation.defaults = {
display: true,
adjustScaleRange: true,
borderDash: [],
borderDashOffset: 0,
borderWidth: 1,
display: true,
pointStyle: 'circle',
radius: 10,
rotation: 0,
Expand Down
2 changes: 1 addition & 1 deletion src/types/polygon.js
Expand Up @@ -47,13 +47,13 @@ export default class PolygonAnnotation extends Element {
PolygonAnnotation.id = 'polygonAnnotation';

PolygonAnnotation.defaults = {
display: true,
adjustScaleRange: true,
borderCapStyle: 'butt',
borderDash: [],
borderDashOffset: 0,
borderJoinStyle: 'miter',
borderWidth: 1,
display: true,
radius: 10,
rotation: 0,
sides: 3,
Expand Down