Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragable in win phone 8.1 and base 64 #9

Open
Tecaa opened this issue Jul 27, 2015 · 1 comment
Open

Dragable in win phone 8.1 and base 64 #9

Tecaa opened this issue Jul 27, 2015 · 1 comment

Comments

@Tecaa
Copy link

Tecaa commented Jul 27, 2015

I give you 2 solutions to 2 problems I had recently:
The first is when you are using base 64 images from any database or whatever.
I modified the plugin adding the "base64" option as a boolean, and I added the lines
var b64 = "";
if (options.base64)
b64 = "data:image/jpeg;base64,";

after the options reading and when we need to set the src of images we put b64 var before like this:
...
var o =$("").attr("src",b64+record).load(function() {
...
pic.attr("src",b64+imgArr[newIndex]);
...
window.setInterval(function() { pic.attr("src", b64+imgArr[++newIndex % imgArr.length])} , speed);
....

this way we can use base 64 encode in this plugin.

The second problem was with Internet Explorer on Windows Phone 8.1 because I want to rotate my images with "click" enabled but it makes the page drag and drop instead of rotate the image.

Then I set in html and the problem is fixed! 😃

@matdumsa
Copy link
Owner

Can you propose a pull request for these two issues? I'd be glad to look at
them and contribute them back to the repository

On Mon, Jul 27, 2015 at 10:49 AM, Tecaa [email protected] wrote:

I let you 2 solutions to 2 problems I had recently:
The first is when you are using base 64 images from any database or
whatever.
I modified the plugin adding the "base64" option as a boolean, and I added
the lines
var b64 = "";
if (options.base64)
b64 = "data:image/jpeg;base64,";

after the options reading and when we need to set the src of images we put
b64 var before like this:
...
var o =$("").attr("src",b64+record).load(function() {
...
pic.attr("src",b64+imgArr[newIndex]);
...
window.setInterval(function() { pic.attr("src", b64+imgArr[++newIndex %
imgArr.length])} , speed);
....

this way we can use base 64 encode in this plugin.

The second problem was with Internet Explorer on Windows Phone 8.1 because
I want to rotate my images with "click" enabled but it makes the page drag
and drop instead of rotate the image.

Then I set in html and the problem is fixed! [image: 😃]


Reply to this email directly or view it on GitHub
#9.

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

No branches or pull requests

2 participants