File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 53
53
obj.PlotOptions.CleanFeedTitle = true ;
54
54
obj.PlotOptions.FileName = ' ' ;
55
55
obj.PlotOptions.FileOpt = ' new' ;
56
- obj.PlotOptions.WorldReadable = true ;
56
+ obj.PlotOptions.WorldReadable = obj . get_sharing ;
57
57
obj.PlotOptions.ShowURL = true ;
58
58
obj.PlotOptions.OpenURL = true ;
59
59
obj.PlotOptions.Strip = true ;
@@ -887,6 +887,23 @@ function delete(obj)
887
887
link_domain = strrep(plotly_domain , ' https://' , ' ' );
888
888
link_domain = strrep(link_domain , ' http://' , ' ' );
889
889
link_text = [' Export to ' link_domain ];
890
- end
890
+ end
891
+
892
+ function sharing_value = get_sharing(obj )
893
+ config = loadplotlyconfig();
894
+ config = config .sharing ;
895
+ if ~isempty(config )
896
+ if strcmp(config , ' private' )
897
+ sharing_value = false ;
898
+ elseif strcmp(config , ' secret' )
899
+ warning(' Secret share keys are not currently supported in the MATLAB API.' )
900
+ sharing_value = false ;
901
+ else
902
+ sharing_value = true ;
903
+ end
904
+ else
905
+ sharing_value = true ;
906
+ end
907
+ end
891
908
end
892
909
end
You can’t perform that action at this time.
0 commit comments