Skip to content

Commit e1faa78

Browse files
avoid collisions with other global functions
1 parent c38cb8e commit e1faa78

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

classes/Visualizer/Render/Page/Update.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected function _toHTML() {
5151
if ( $this->settings ) {
5252
echo 'win.visualizer.charts.canvas.settings = ', $this->settings, ';';
5353
}
54-
echo 'win.updateChartPreview();';
54+
echo 'win.vizUpdateChartPreview();';
5555

5656
echo $this->updateEditorAndSettings();
5757

@@ -87,7 +87,7 @@ private function updateEditorAndSettings() {
8787

8888
$sidebar = apply_filters( 'visualizer_get_sidebar', '', $this->id );
8989

90-
return 'win.updateHTML(' . json_encode( array( 'html' => $editor ) ) . ', ' . json_encode( array( 'html' => $sidebar ) ) . ');';
90+
return 'win.vizUpdateHTML(' . json_encode( array( 'html' => $editor ) ) . ', ' . json_encode( array( 'html' => $sidebar ) ) . ');';
9191
}
9292

9393
}

js/preview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
$(document).ready(function() {
1010
// when data is impported using csv/url, update the hidden data and the advanced settings sidebar.
1111
// editor and sidebar are both JSON objects
12-
window.updateHTML = function( editor, sidebar ) {
12+
window.vizUpdateHTML = function( editor, sidebar ) {
1313
$('.viz-simple-editor').remove();
1414
$('#content').append(editor.html);
1515
$('#settings-form .viz-group').remove();

js/render-facade.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
$(document).ready(function(){
8484

8585
// for updating the currently displayed chart (preview mode)
86-
window.updateChartPreview = function(){
86+
window.vizUpdateChartPreview = function(){
8787
var event = new CustomEvent('visualizer:render:currentchart:update', {detail: {visualizer: visualizer}});
8888
document.body.dispatchEvent(event);
8989
};

0 commit comments

Comments
 (0)