From 70ebe7228d820df09f0cfbef2580a9b905a90c34 Mon Sep 17 00:00:00 2001 From: My-Tien Nguyen Date: Mon, 18 Mar 2024 17:38:34 +0100 Subject: [PATCH] Add "between to newshape.layer as well. Make line length of description shorter. --- src/components/shapes/attributes.js | 5 ++++- src/components/shapes/draw_newshape/attributes.js | 7 +++++-- test/plot-schema.json | 13 ++++++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/components/shapes/attributes.js b/src/components/shapes/attributes.js index 1d55f04074b..99590f4a000 100644 --- a/src/components/shapes/attributes.js +++ b/src/components/shapes/attributes.js @@ -113,7 +113,10 @@ module.exports = templatedArray('shape', { values: ['below', 'above', 'between'], dflt: 'above', editType: 'arraydraw', - description: 'Specifies whether shapes are drawn below gridlines (*below*), between gridlines and traces (*between*) or above traces (*above*).' + description: [ + 'Specifies whether shapes are drawn below gridlines (*below*),', + 'between gridlines and traces (*between*) or above traces (*above*).' + ] }, xref: extendFlat({}, annAttrs.xref, { diff --git a/src/components/shapes/draw_newshape/attributes.js b/src/components/shapes/draw_newshape/attributes.js index 4cad7c7d27f..bacd6e07504 100644 --- a/src/components/shapes/draw_newshape/attributes.js +++ b/src/components/shapes/draw_newshape/attributes.js @@ -117,9 +117,12 @@ module.exports = overrideAll({ }, layer: { valType: 'enumerated', - values: ['below', 'above'], + values: ['below', 'above', 'between'], dflt: 'above', - description: 'Specifies whether new shapes are drawn below or above traces.' + description: [ + 'Specifies whether new shapes are drawn below gridlines (*below*),', + 'between gridlines and traces (*between*) or above traces (*above*).' + ] }, drawdirection: { valType: 'enumerated', diff --git a/test/plot-schema.json b/test/plot-schema.json index 0fe2b0235fa..9ff3ae08540 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -3720,13 +3720,17 @@ } }, "layer": { - "description": "Specifies whether new shapes are drawn below or above traces.", + "description": [ + "Specifies whether new shapes are drawn below gridlines (*below*),", + "between gridlines and traces (*between*) or above traces (*above*)." + ], "dflt": "above", "editType": "none", "valType": "enumerated", "values": [ "below", - "above" + "above", + "between" ] }, "legend": { @@ -7708,7 +7712,10 @@ } }, "layer": { - "description": "Specifies whether shapes are drawn below gridlines (*below*), between gridlines and traces (*between*) or above traces (*above*).", + "description": [ + "Specifies whether shapes are drawn below gridlines (*below*),", + "between gridlines and traces (*between*) or above traces (*above*)." + ], "dflt": "above", "editType": "arraydraw", "valType": "enumerated",