GithubHelp home page GithubHelp logo

Comments (8)

Artform avatar Artform commented on July 23, 2024

Each div should have it's own ID. If you are using the same options for each div, just define your options once and use them for each ID. For example:

var yourOptions = {
uploadUrl:'img_save_to_file.php',
cropUrl:'img_crop_to_file.php',
modal:true,
imgEyecandyOpacity:0.4
}
var image1 = new Croppic('image1', yourOptions);
var image2 = new Croppic('image2', yourOptions);
var image3 = new Croppic('image3', yourOptions);

from croppic.

25ml avatar 25ml commented on July 23, 2024

Still won't work!!! Please help :( :(

from croppic.

Artform avatar Artform commented on July 23, 2024

Share a sample of your code: http://jsfiddle.net/

from croppic.

25ml avatar 25ml commented on July 23, 2024

Interesting,in fiddle I noticed that the other 2 box's upload button is on top right of the page, that's why i didn't notice them in my original page. Even so, why is doing that???

http://jsfiddle.net/25ml/g38sL0t3/1/

By the way, I also don't understaind why the "eye candy" won't work, even on the original page! http://www.croppic.net/

As soon as I click "crop" I can wait all night, nothing happen, IE / Chrome, but the others examples work.

from croppic.

Artform avatar Artform commented on July 23, 2024

The issue about the images relates to CSS positioning: http://jsfiddle.net/g38sL0t3/2/
#cropContainerModal3, #cropContainerModal2, #cropContainerModal1 { position:relative; }

Regarding Eye Candy, it just means no image appears to reveal crop area. That's my understanding of it. I would need to know what browser you're testing in.

Cropping in the jsfiddle won't result in anything because there is no PHP file.

from croppic.

25ml avatar 25ml commented on July 23, 2024

You did it! ahah, but it's weird, at least the original #cropContainerModal should be on CSS in the first place, would be more easier to add more, I would never find that out on my own.

About Eye Candy, I don't know if I explained myself good enough. So I click the button, browse the file, move to the position I want, and then click crop and he starts making that loading animation like forever. This happens even in the original website.

I'm using IE 11, Chrome latest version and Chrome Cannary 64bits latest version

from croppic.

Artform avatar Artform commented on July 23, 2024

Interesting! I just tried this myself and see a JS error on line 450 of croppic.js: that.imgEyecandy.hide();

Uncaught TypeError: undefined is not a function croppic.js:450
(anonymous function)

I'm unsure what is triggering this. I'm wondering if it's a problem with the initialization of the container:
var croppicContainerEyecandyOptions = { uploadUrl:'img_save_to_file.php', cropUrl:'img_crop_to_file.php', imgEyecandy:false, // THIS IS THE PROBLEM loaderHtml:'<div class="loader bubblingG"><span id="bubblingG_1"></span><span id="bubblingG_2"></span><span id="bubblingG_3"></span></div> ' } var cropContainerEyecandy = new Croppic('cropContainerEyecandy', croppicContainerEyecandyOptions);

It might be best to use imgEyecandyOpacity:0 to mimic the same effect instead of imgEyecandy:false

from croppic.

25ml avatar 25ml commented on July 23, 2024

Nice I will try that later.

--- // ---

Now a little off-topic: Is it possible, when we upload the picture to capture the filename? via div or just copy the filename to a hidden textbox value ?

Because in regular forms it's easy to capture via $_POST, but in this case we are talking about a DIV.

yes the img_save_to_file.php knows the filename but the php that have the DIV can't retrieve that variable from img_save_to_file.php

from croppic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.