Skip to content

Commit

Permalink
remove redundant code in resize function
Browse files Browse the repository at this point in the history
  • Loading branch information
streamtw committed Oct 18, 2018
1 parent 8282aea commit d8fa4bb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 1 addition & 5 deletions src/Controllers/ResizeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,10 @@ public function getResize()

public function performResize()
{
$dataX = request('dataX');
$dataY = request('dataY');
$height = request('dataHeight');
$width = request('dataWidth');
$image_path = $this->lfm->setName(request('img'))->path('absolute');

event(new ImageIsResizing($image_path));
Image::make($image_path)->resize($width, $height)->save();
Image::make($image_path)->resize(request('dataWidth'), request('dataHeight'))->save();
event(new ImageWasResized($image_path));

return parent::$success_response;
Expand Down
2 changes: 0 additions & 2 deletions src/views/resize.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@
function doResize() {
performLfmRequest('doresize', {
img: $("#img").val(),
dataX: $("#dataX").val(),
dataY: $("#dataY").val(),
dataHeight: $("#height").val(),
dataWidth: $("#width").val()
}).done(loadItems);
Expand Down

0 comments on commit d8fa4bb

Please sign in to comment.