PluginProbe
Depicter — Popup & Slider Builder / 1.5.2
Depicter — Popup & Slider Builder v1.5.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
depicter / app / src / Document / Models / Common / Styles / Transform.php

Transform.php in Depicter — Popup & Slider Builder 1.5.2, at app/src/Document/Models/Common/Styles/Transform.php

41 lines 1002 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Depicter\Document\Models\Common\Styles;
3
4 use Depicter\Document\CSS\Breakpoints;
5
6 class Transform extends States
7 {
8 /**
9 * style name
10 */
11 const NAME = 'transform';
12
13 public function set( $css ) {
14 $devices = Breakpoints::names();
15 foreach ( $devices as $device ) {
16 $transform_styles = '';
17
18 if ( !empty( $this->{$device} ) ) {
19 if ( !empty( $this->{$device}->rotate ) ) {
20 $transform_styles .= "rotate(" . $this->{$device}->rotate . "deg) ";
21 }
22 if ( !empty( $this->{$device}->scaleX ) ) {
23 $transform_styles .= "scaleX(" . $this->{$device}->scaleX . ") ";
24 }
25 if ( !empty( $this->{$device}->scaleY ) ) {
26 $transform_styles .= "scaleY(" . $this->{$device}->scaleY . ") ";
27 }
28 if ( !empty( $this->{$device}->scale ) ) {
29 $transform_styles .= "scale(" . $this->{$device}->scale . ") ";
30 }
31
32 if( $transform_styles = trim( $transform_styles ) ){
33 $css[ $device ][ self::NAME ] = $transform_styles;
34 }
35 }
36 }
37
38 return $css;
39 }
40 }
41