PluginProbe
Depicter — Popup & Slider Builder / 1.9.2
Depicter — Popup & Slider Builder v1.9.2
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
← All changes | app/src/Document/Models/Section.php +24 -3 1.3.81.9.2 View file →
@@ -62,8 +62,14 @@
62 62 */
63 63 public $parallax;
64 64
65 65 /**
66 + * @var Common\KenBurns|null
67 + */
68 + public $kenBurns;
69 +
70 +
71 + /**
66 72 * @var Common\DataSourceOptions|null
67 73 */
68 74 public $dataSource = null;
69 75
@@ -162,9 +168,9 @@
162 168 protected function renderDataSource() {
163 169 $sectionMarkup = '';
164 170 $dataSourceInstance = \Depicter::dataSource()->getByType( $this->dataSource->type );
165 171 if( $dataSourceInstance ){
166 - $dataSheets = $dataSourceInstance->getRecordsWithTags( $this->dataSource->params );
172 + $dataSheets = $dataSourceInstance->getDataSheetArgs( $this->dataSource->params );
167 173 foreach( $dataSheets as $dataSheet ){
168 174 $this->setDataSheet( $dataSheet );
169 175 $sectionMarkup .= $this->renderStatic();
170 176 }
@@ -188,12 +194,20 @@
188 194 if ( !empty( $this->wrapperSize ) ) {
189 195 $sectionWidth = $this->wrapperSize->getResponsiveSizes( "width" );
190 196 if ( ! $this->wrapperSize->hasNoResponsiveSize( $sectionWidth ) ) {
191 197 $args[ 'data-wrapper-width'] = implode( ',', $sectionWidth );
198 + $args[ 'data-wrapper-width'] = str_replace( 'auto', '', $args[ 'data-wrapper-width'] );
199 + if ( $args[ 'data-wrapper-width'] == ',,' ) {
200 + unset( $args[ 'data-wrapper-width'] );
201 + }
192 202 }
193 203 $sectionHeight = $this->wrapperSize->getResponsiveSizes( "height" );
194 204 if ( ! $this->wrapperSize->hasNoResponsiveSize( $sectionHeight ) ) {
195 205 $args['data-wrapper-height'] = implode( ',', $sectionHeight );
206 + $args[ 'data-wrapper-height'] = str_replace( 'auto', '', $args[ 'data-wrapper-height'] );
207 + if ( $args[ 'data-wrapper-height'] == ',,' ) {
208 + unset( $args[ 'data-wrapper-height'] );
209 + }
196 210 }
197 211 }
198 212
199 213 if ( !empty( $this->options ) ) {
@@ -235,8 +249,13 @@
235 249 }
236 250 }
237 251 if( $sectionBackground = $this->background->render() ){
238 252 $this->background->setDataSheet( $this->getDataSheet() );
253 +
254 + if ( $this->kenBurns && false !== $kenBurnsData = $this->kenBurns->getKenBurnsAttrs() ) {
255 + $this->background->setKenBurnsData( $kenBurnsData );
256 + }
257 +
239 258 $div->nest( "\n" . $this->background->render() . "\n\n" );
240 259 }
241 260
242 261 $this->styleList = Arr::merge( $this->styleList, $this->getSelectorAndCssList() );
@@ -405,11 +424,13 @@
405 424 */
406 425 protected function getSelectorAndCssList(){
407 426 $styleList = [];
408 427
409 - $styleList[ '.' . $this->getStyleSelector() ] = $this->background->getColor();
428 + $styleList[ '.' . $this->getStyleSelector() . ' .' . $this->background->getContainerClassName() ] = array_merge_recursive(
429 + $this->background->getColor(),
430 + $this->background->getSectionBackgroundFilter()
431 + );
410 432 $styleList[ '.' . $this->getStyleSelector() . ' .' . $this->background->getContainerClassName() . '::after' ] = $this->background->getOverlayStyles();
411 - $styleList[ '.' . $this->getStyleSelector() . ' .' . $this->background->getContainerClassName() ] = $this->background->getSectionBackgroundFilter();
412 433
413 434 if ( $this->getCustomStyles() ) {
414 435 $styleList[ '.' . $this->getStyleSelector() ]['customStyle'] = $this->getCustomStyles();
415 436 }