Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9615b6e

Browse files
committed
_isLinkedToArray isn't used anymore, use items instead
1 parent 22c1239 commit 9615b6e

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

_includes/reference-block.html

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<ul>
22
{% for obj in attribute %}
3-
{% if obj[0] != "flags" and obj[0] != "dflt" and obj[0] != "values" and obj[0] != "valType" and obj[0] != "role" and obj[0] != "min" and obj[0] != "max" and obj[0] != "arrayOk" and obj[0] != "flags" and obj[0] != "extras" and obj[0] != "description" and obj[0] != "_isLinkedToArray" %}
3+
{% if obj[0] != "flags" and obj[0] != "dflt" and obj[0] != "values" and obj[0] != "valType" and obj[0] != "role" and obj[0] != "min" and obj[0] != "max" and obj[0] != "arrayOk" and obj[0] != "flags" and obj[0] != "extras" and obj[0] != "description" and obj[0] != "_isLinkedToArray" and obj[0] != "items" %}
44

55
{% if obj[0] == "type" and page.language == "python" and block == "data" %}
66
{% continue %}
@@ -65,16 +65,8 @@
6565
{% capture graph_object %}{{ graph_object | replace: '_', ' ') | capitalize_all | replace: ' ', '' | replace: '2d', '2D' | replace: '3d' : '3D'}}{% endcapture %}
6666
{% endif %}
6767

68-
{% if obj[1]._isLinkedToArray %}
69-
{% if page.language != "python" %}
70-
(<code tooltip="An {% raw %}{array}{% endraw %} of {% raw %}{object}{% endraw %}s. Each {% raw %}{object}{% endraw %} has one or more of the keys listed below." class="attribute-type">{% raw %}{array}{% endraw %} of {% raw %}{object}{% endraw %}s</code>)
71-
{% else %}
72-
{% capture graph_object_length_minus_plural %}{{ graph_object | size | minus:1 }}{% endcapture %}
73-
{% capture graph_object %}{{ graph_object | truncate: graph_object_length_minus_plural, '' }}{% endcapture %}
74-
(<code class="attribute-type">{% raw %}{array}{% endraw %} of <code>plotly.graph_objs.{{graph_object}}</code> objects</code>)
75-
<br>Each <code>plotly.graph_objs.{{ graph_object }}</code> is an object with one or more of the named arguments or attributes listed below.
76-
Import as: <br><code>import plotly.graph_objs as go</code><br><code>go.{{ graph_object }}</code>
77-
{% endif %}
68+
{% if obj[1].items %}
69+
(<code tooltip="{% raw %}{array}{% endraw %} of {% raw %}{object}{% endraw %}s. Each {% raw %}{object}{% endraw %} has one or more of the keys listed below." class="attribute-type">{% raw %}{array}{% endraw %} of {% raw %}{object}{% endraw %}s</code>)
7870
{% else %}
7971
{% if page.language != "python" %}
8072
(<code tooltip="An {% raw %}{object}{% endraw %} with one or more of the keys listed below." class="attribute-type">{% raw %}{object}{% endraw %}</code>)
@@ -112,10 +104,22 @@
112104
{% if display_info and obj[1].description %}
113105
<br>{{ obj[1].description | escape }}
114106
{% endif %}
107+
108+
{% if obj[1].items %}
109+
<br>Each {% raw %}{object}{% endraw %} has one or more of the keys listed below.
110+
{% endif %}
111+
115112
{% if obj[1].role == "object" %}
116113
{% assign parentattribute = attribute %}
117114
{% capture localparentlink %}{{include.parentlink}}-{{obj[0]}}{% endcapture %}
118-
{% assign attribute = obj[1] %}
115+
{% if obj[1].items %}
116+
<!--This will break if there ever more than one type of item in in items - but for now it's just "shape" and "annotation"-->
117+
{% for item in obj[1].items %}
118+
{% assign attribute = item[1] %}
119+
{% endfor %}
120+
{% else %}
121+
{% assign attribute = obj[1] %}
122+
{% endif %}
119123
{% assign block = "nested" %}
120124
{% include reference-block.html parentlink=localparentlink block=block %}
121125
{% assign attribute = parrentattribute %}

0 commit comments

Comments
 (0)