| @@ -37,11 +37,8 @@ | ||
| 37 | 37 | * |
| 38 | 38 | * @access protected |
| 39 | 39 | */ |
| 40 | 40 | protected function _toHTML() { |
| 41 | - if ( $this->is_request_from_gutenberg() ) { | |
| 42 | - return; | |
| 43 | - } | |
| 44 | 41 | echo '<!DOCTYPE html>'; |
| 45 | 42 | echo '<html>'; |
| 46 | 43 | echo '<head>'; |
| 47 | 44 | echo '<script type="text/javascript">'; |
| @@ -53,11 +50,9 @@ | ||
| 53 | 50 | echo 'win.visualizer.charts.canvas.data = ', $this->data, ';'; |
| 54 | 51 | if ( $this->settings ) { |
| 55 | 52 | echo 'win.visualizer.charts.canvas.settings = ', $this->settings, ';'; |
| 56 | 53 | } |
| 57 | - echo 'win.vizUpdateChartPreview();'; | |
| 58 | - | |
| 59 | - // echo $this->updateEditorAndSettings(); | |
| 54 | + echo 'win.visualizer.update();'; | |
| 60 | 55 | echo '}'; |
| 61 | 56 | |
| 62 | 57 | do_action( 'visualizer_add_update_hook', $this->series, $this->data ); |
| 63 | 58 | |
| @@ -72,24 +67,7 @@ | ||
| 72 | 67 | echo '</script>'; |
| 73 | 68 | echo '</head>'; |
| 74 | 69 | echo '<body></body>'; |
| 75 | 70 | echo '</html>'; |
| 76 | - } | |
| 77 | - | |
| 78 | - | |
| 79 | - /** | |
| 80 | - * Update the hidden content in the LHS and the advanced settings | |
| 81 | - */ | |
| 82 | - private function updateEditorAndSettings() { | |
| 83 | - $editor = ''; | |
| 84 | - if ( Visualizer_Module::can_show_feature( 'simple-editor' ) ) { | |
| 85 | - ob_start(); | |
| 86 | - Visualizer_Render_Layout::show( 'simple-editor-screen', $this->id ); | |
| 87 | - $editor = ob_get_clean(); | |
| 88 | - } | |
| 89 | - | |
| 90 | - $sidebar = apply_filters( 'visualizer_get_sidebar', '', $this->id ); | |
| 91 | - | |
| 92 | - return 'win.vizUpdateHTML(' . json_encode( array( 'html' => $editor ) ) . ', ' . json_encode( array( 'html' => $sidebar ) ) . ');'; | |
| 93 | 71 | } |
| 94 | 72 | |
| 95 | 73 | } |