Skip to content

Commit

Permalink
ATT-1:Enable rotation of image attachments, adding the javascript cod…
Browse files Browse the repository at this point in the history
…e and enabling the java code to call 'rotate instruction
  • Loading branch information
Wandji69 committed Mar 21, 2019
1 parent 1ab881a commit 2e74aec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ protected boolean deleteComplexData(Obs obs, AttachmentComplexData complexData)

@Override
protected ValueComplex saveComplexData(Obs obs, AttachmentComplexData complexData) {
if (obs.getValueModifier().equals("instructions.rotate-right")) {
// rotate the image provided in complex data
}
obs.setValueModifier(null);

int imageHeight = Integer.MAX_VALUE;
int imageWidth = Integer.MAX_VALUE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ angular.module('att.widget.thumbnail')
uuid: $scope.obs.uuid,
comment: $scope.obs.comment
});
Attachment.save({
uuid: $scope.obs.uuid,
valueModifier: "instructions.rotate-right"
});
saved.$promise.then(function(attachment) {
$scope.obs.uuid = attachment.uuid;
$scope.toggleEditMode(false);
Expand Down Expand Up @@ -278,4 +282,4 @@ angular.module('att.widget.thumbnail')
}
}
};
}]);
}]);

0 comments on commit 2e74aec

Please sign in to comment.