Closed philippfrenzel closed 8 years ago
sample:
You should take into account aspectRatio both in Uploader and in Illustrated behavior. For instance:
public function behaviors(){
return [
[
'class' => 'sjaakp\illustrated\Illustrated',
...
'aspectRatio' => 0.75,
...
],
];
}
In form:
<?= $form->field($model, 'image')->widget(Uploader::className(), ['aspectRatio' => 0.75]) ?>
I agree, but as you can 'change' Ratio on switching e.g. Landscape it doesn't adopt ratio:( or am I doing something wrong?
Not sure as I haven't tested it but I guess if you want to have aspect ratio in Illustrated to change accordingly to the dynamic aspect ratio in Uploader you should include it as a field in your DB, then set aspectRatio in the behavior as the name of such attribute. Check aspectRatio definition in "Illustrated Options" chapter (float is for fixed aspect ratio -square in your case- string for attribute definition -hence dynamic, this should be what you are looking for-).
hmm, still don't get it to run... it's killing my pictures...:(
Hi,
looks like I can upload the images, I manage to get the dimensions to set, but everytime I save, it converts the image to be 240x240:( And even "scales" them down, so proportions (aspect) get's lost:(
Thanks for your help!