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()
{
return include __DIR__ . '/config/module.config.php';

View File

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

View File

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

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][title]' => $data['title'],
'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][addPreLoadImage]' => $data['addPreLoadImage'],
]);
@ -102,7 +101,6 @@ class Render3D extends AbstractBlockLayout
'model_type' => $model_type,
'title' => $block->dataValue('title'),
'width' => $width,
'ratio' => $block->dataValue('ratio'),
'height' => $height,
'item_url' => $attachments[0]->item()->url(),
'renderSourceLink' => $block->dataValue('renderSourceLink'),