MCPcopy Index your code
hub / github.com/plotly/plotly.js / positionPlayWithData

Function positionPlayWithData

src/plots/plots.js:180–202  ·  view source on GitHub ↗
(gd, container)

Source from the content-addressed store, hash-verified

178// note that now this function is only adding the brand in
179// iframes and 3rd-party apps
180function positionPlayWithData(gd, container) {
181 container.text('');
182 var link = container.append('a')
183 .attr({
184 'xlink:xlink:href': '#',
185 class: 'link--impt link--embedview',
186 'font-weight': 'bold'
187 })
188 .text(gd._context.linkText + ' ' + String.fromCharCode(187));
189
190 if(gd._context.sendData) {
191 link.on('click', function() {
192 plots.sendDataToCloud(gd);
193 });
194 } else {
195 var path = window.location.pathname.split('/');
196 var query = window.location.search;
197 link.attr({
198 'xlink:xlink:show': 'new',
199 'xlink:xlink:href': '/' + path[2].split('.')[0] + '/' + path[1] + query
200 });
201 }
202}
203
204plots.sendDataToCloud = function(gd, serverURL) {
205 gd.emit('plotly_beforeexport');

Callers 1

plots.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…