Compare commits

..

No commits in common. "ae13afa4454a4bf476d2d790be1a6f21720d2a4a" and "ea50a69804d727497cf6f6abe505fbab95bad47f" have entirely different histories.

4 changed files with 7 additions and 29 deletions

View File

@ -22,18 +22,6 @@ class Module extends AbstractModule
*/ */
]; ];
const MODEL_WIDTH = [
'50' => '50 %',
'75' => '75 %',
'100' => '100 %',
];
const RATIO = [
'2' => '2:1',
'1.333' => '4:3',
'1.777' => '16:9'
];
public function getConfig() public function getConfig()
{ {
return include __DIR__ . '/config/module.config.php'; return include __DIR__ . '/config/module.config.php';

View File

@ -24,7 +24,6 @@ return [
'renderSourceLink' => true, 'renderSourceLink' => true,
//'addPreLoadImage' => true, //'addPreLoadImage' => true,
'width' => 600, 'width' => 600,
'ratio' => '1.333',
'wrapStyle' => 'overflow-y: hidden;display: flex;flex-direction: column;justify-content: center;', 'wrapStyle' => 'overflow-y: hidden;display: flex;flex-direction: column;justify-content: center;',
'ui_background' => 'rgba(0,0,0,0.1)', 'ui_background' => 'rgba(0,0,0,0.1)',
] ]

View File

@ -22,20 +22,13 @@ class Render3DBlockForm extends Form
$this->add([ $this->add([
'name' => 'o:block[__blockIndex__][o:data][width]', 'name' => 'o:block[__blockIndex__][o:data][width]',
'type' => Element\Select::class, 'type' => Element\Number::class,
'options' => [ 'options' => [
'label' => 'Width', 'label' => 'Width in pixels',
'value_options' => Module::MODEL_WIDTH, ],
], 'attributes' => [
]); 'min' => '100',
],
$this->add([
'name' => 'o:block[__blockIndex__][o:data][ratio]',
'type' => Element\Select::class,
'options' => [
'label' => 'Ratio',
'value_options' => Module::RATIO,
],
]); ]);
$this->add([ $this->add([
@ -61,7 +54,7 @@ class Render3DBlockForm extends Form
], ],
]); ]);
*/ */
$this->add([ $this->add([
'name' => 'o:block[__blockIndex__][o:data][title]', 'name' => 'o:block[__blockIndex__][o:data][title]',
'type' => Element\Text::class, 'type' => Element\Text::class,

View File

@ -50,7 +50,6 @@ class Render3D extends AbstractBlockLayout
'o:block[__blockIndex__][o:data][model_type]' => $data['model_type'], 'o:block[__blockIndex__][o:data][model_type]' => $data['model_type'],
'o:block[__blockIndex__][o:data][title]' => $data['title'], 'o:block[__blockIndex__][o:data][title]' => $data['title'],
'o:block[__blockIndex__][o:data][width]' => $data['width'], 'o:block[__blockIndex__][o:data][width]' => $data['width'],
'o:block[__blockIndex__][o:data][ratio]' => $data['ratio'],
'o:block[__blockIndex__][o:data][renderSourceLink]' => $data['renderSourceLink'], 'o:block[__blockIndex__][o:data][renderSourceLink]' => $data['renderSourceLink'],
//'o:block[__blockIndex__][o:data][addPreLoadImage]' => $data['addPreLoadImage'], //'o:block[__blockIndex__][o:data][addPreLoadImage]' => $data['addPreLoadImage'],
]); ]);
@ -102,7 +101,6 @@ class Render3D extends AbstractBlockLayout
'model_type' => $model_type, 'model_type' => $model_type,
'title' => $block->dataValue('title'), 'title' => $block->dataValue('title'),
'width' => $width, 'width' => $width,
'ratio' => $block->dataValue('ratio'),
'height' => $height, 'height' => $height,
'item_url' => $attachments[0]->item()->url(), 'item_url' => $attachments[0]->item()->url(),
'renderSourceLink' => $block->dataValue('renderSourceLink'), 'renderSourceLink' => $block->dataValue('renderSourceLink'),