Skip to content

Commit 59e9748

Browse files
Merge branch '3.4.0' of https://github.com/codeinwp/visualizer into test-3.4.0
2 parents 36d3da8 + 087b11a commit 59e9748

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

classes/Visualizer/Render/Library.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,13 @@ private function _renderLibrary() {
118118
echo ' | </li>';
119119
}
120120
echo '</ul>';
121+
121122
echo '<form action="" method="get"><p id="visualizer-search" class="search-box">
122123
<input type="search" placeholder="' . __( 'Enter title', 'visualizer' ) . '" name="s" value="' . $filterBy . '">
123124
<input type="hidden" name="page" value="visualizer">
124125
<button type="submit" id="search-submit" title="' . __( 'Search', 'visualizer' ) . '"><i class="dashicons dashicons-search"></i></button>
125-
<button type="button" class="add-new-chart" title="' . __( 'Add New', 'visualizer' ) . '"><i class="dashicons dashicons-plus-alt"></i></button>
126126
</p> </form>';
127+
127128
echo '</div>';
128129
echo '<div id="visualizer-content-wrapper">';
129130
if ( ! empty( $this->charts ) ) {

js/render-datatables.js

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,26 @@
6262
case 'post':
6363
// fall-through.
6464
case 'library':
65-
// remove scrollY if its greater than what will fit in the box (along with the legend).
66-
if(parseInt(chart.settings['scrollY_int']) > 180){
67-
chart.settings['scrollY_int'];
68-
}
69-
delete chart.settings['scrollX'];
70-
$.extend( settings, {
65+
// for smaller screens...
66+
if(screen.width < 1300){
67+
delete chart.settings['scrollX'];
68+
delete chart.settings['scrollY'];
69+
delete chart.settings['scrollY_int'];
70+
$.extend( settings, {
71+
scrollX: 150,
72+
scrollY: (0.5 * parseInt($(container).css('height').replace('px',''))),
73+
scrollCollapse: true,
74+
} );
75+
}else{
76+
if(parseInt(chart.settings['scrollY_int']) > 180){
77+
chart.settings['scrollY_int'];
78+
}
79+
delete chart.settings['scrollX'];
80+
$.extend( settings, {
7181
scrollX: 150,
7282
scrollY: 180,
73-
} );
83+
} );
84+
}
7485
break;
7586
case 'chart':
7687
delete chart.settings['scrollX']; // jshint ignore:line

js/render-facade.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@
8787
// fixed as part of the issue to add annotations.
8888
if(visualizer.page_type === 'library'){
8989
if(localStorage.getItem( 'viz-facade-loaded' ) === '1'){
90+
// prevent library from hanging.
91+
setTimeout( function(){
92+
localStorage.removeItem( 'viz-facade-loaded' );
93+
}, 2000);
9094
return;
9195
}
9296
localStorage.setItem( 'viz-facade-loaded', '1');

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ On top of our responsive charts and graphs, you can also add our responsive tabl
2525
### Flexible and customizable ###
2626
Make the charts your own. Configure an extensive set of options to perfectly match the look and feel of your website. You can use Google Chart Tools with their default setting - all customization is optional and the basic setup is launch-ready. However, charts and graphs can be easily customizable in case your webpage adopts a style which is at odds with provided defaults. Every chart exposes a number of options that customize its look and feel.
2727

28+
### Gutenberg support ###
29+
Whether you like Gutenberg or not, it doesn't matter, you can add your charts using our easy-to-use gutenberg interface, or simply paste your chart code on the old editor.
30+
2831
### Responsive Charts in HTML5/SVG ###
2932
Charts are rendered using HTML5/SVG technology to provide cross-browser compatibility (including VML for older IE versions) and cross platform portability to iPhones, iPads and Android. Your users will never have to mess with extra plugins or any software. If they have a web browser, they can see your charts.
3033

0 commit comments

Comments
 (0)