Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

How to flip image using raphael free transform.? #139

Open
vped opened this issue Dec 5, 2014 · 0 comments
Open

How to flip image using raphael free transform.? #139

vped opened this issue Dec 5, 2014 · 0 comments

Comments

@vped
Copy link

vped commented Dec 5, 2014

Isuue: I am using RaphaelJS ans Raphael-Free-Transform for image manipulation in my project. Here I am trying to flip image horzontally. For this I am changing free transform scale value. Image is fliped, but the image gets displaced from its original position and it also gets restored to its original state so we also lose the flip.

$scope.flopImage = function () {
if ($scope.currentImage !== null) {
var ft = paper.freeTransform($scope.currentImage);
ft.attrs.scale.x=-ft.attrs.scale.x;
ft.apply();
}
};
CASE:2
$scope.flopImage = function () {
if ($scope.currentImage !== null) {
var ft = paper.freeTransform($scope.currentImage);
$scope.currentImage.transform("S-1,1");
ft.apply();
}
};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant