<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Jcrop v0.9.6 Released (Numerous enhancements)</title>
	<atom:link href="http://deepliquid.com/blog/archives/134/feed" rel="self" type="application/rss+xml" />
	<link>http://deepliquid.com/blog/archives/134</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Fri, 10 Sep 2010 22:04:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: admin</title>
		<link>http://deepliquid.com/blog/archives/134/comment-page-1#comment-10875</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 09 Apr 2009 15:55:04 +0000</pubDate>
		<guid isPermaLink="false">http://deepliquid.com/blog/?p=134#comment-10875</guid>
		<description>Andy, thanks for finding that! I was unaware of that bug. I fixed it after several minutes of struggle, and have rolled fixes for some of these other issues into a new version, 0.9.7. Please try it out and let me know if you find anything else! (or if you don't!) Thanks again, all!</description>
		<content:encoded><![CDATA[<p>Andy, thanks for finding that! I was unaware of that bug. I fixed it after several minutes of struggle, and have rolled fixes for some of these other issues into a new version, 0.9.7. Please try it out and let me know if you find anything else! (or if you don&#8217;t!) Thanks again, all!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SEOAdsenseThemes</title>
		<link>http://deepliquid.com/blog/archives/134/comment-page-1#comment-10524</link>
		<dc:creator>SEOAdsenseThemes</dc:creator>
		<pubDate>Wed, 08 Apr 2009 17:09:54 +0000</pubDate>
		<guid isPermaLink="false">http://deepliquid.com/blog/?p=134#comment-10524</guid>
		<description>Andy is right. Even with "allowSelect" TRUE, a click on the sides of the crop area makes it disappear but you can make it appear again.

When it disappears, the coords all point to a single bottom-left corner.</description>
		<content:encoded><![CDATA[<p>Andy is right. Even with &#8220;allowSelect&#8221; TRUE, a click on the sides of the crop area makes it disappear but you can make it appear again.</p>
<p>When it disappears, the coords all point to a single bottom-left corner.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://deepliquid.com/blog/archives/134/comment-page-1#comment-10475</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Wed, 08 Apr 2009 14:22:10 +0000</pubDate>
		<guid isPermaLink="false">http://deepliquid.com/blog/?p=134#comment-10475</guid>
		<description>Fantastic update - many thanks!

A small problem, though...  If you set the allowSelect to be false and the user clicks once on the resizing area (either the handles or on the sides of the crop area) and don't resize it - literally just a click - then the crop area will disappear and they'd need to reload the page to get it back.</description>
		<content:encoded><![CDATA[<p>Fantastic update - many thanks!</p>
<p>A small problem, though&#8230;  If you set the allowSelect to be false and the user clicks once on the resizing area (either the handles or on the sides of the crop area) and don&#8217;t resize it - literally just a click - then the crop area will disappear and they&#8217;d need to reload the page to get it back.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://deepliquid.com/blog/archives/134/comment-page-1#comment-9762</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 06 Apr 2009 18:51:16 +0000</pubDate>
		<guid isPermaLink="false">http://deepliquid.com/blog/?p=134#comment-9762</guid>
		<description>I don't know enough about browser intricacies to say one way or another, but my understanding is that if you put in a new  tag it will request a new image. 

Now, you may have that image in your cache, but there is still a trip to the server to find that out.

As for your last question, yes, taking the width and height from $origimg works. I just set $img dimensions to $origimg dimensions after the clone():

$img.height($origimg.height());

However, I still don't like the $origimg.hide() method, because it causes a flicker while the original is hidden and the new is loading.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know enough about browser intricacies to say one way or another, but my understanding is that if you put in a new  tag it will request a new image. </p>
<p>Now, you may have that image in your cache, but there is still a trip to the server to find that out.</p>
<p>As for your last question, yes, taking the width and height from $origimg works. I just set $img dimensions to $origimg dimensions after the clone():</p>
<p>$img.height($origimg.height());</p>
<p>However, I still don&#8217;t like the $origimg.hide() method, because it causes a flicker while the original is hidden and the new is loading.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://deepliquid.com/blog/archives/134/comment-page-1#comment-9757</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 06 Apr 2009 18:30:57 +0000</pubDate>
		<guid isPermaLink="false">http://deepliquid.com/blog/?p=134#comment-9757</guid>
		<description>Daniel, you are very astute, thanks again for your help tracking this down. The reason I changed the attachment method slightly was because of the same problem using remove with the previous approach. So, it appears that the use of clone() is somewhat to blame. My understanding is that when an image fires it's onload handler, you'd expect that all the other instances of this src location to be loaded. Is this not the case? Does a browser normally request the same resource more than once per page load, no matter the DOM manipulations? Are you running anything that changes the default cache operation of Firefox? Just curious, because I cannot reproduce this problem yet on fairly default configurations. I'm not testing on localhost but my internet connection is pretty zippy. What if you change boundx and boundy to be set from $origimg instead of $img a couple lines down?</description>
		<content:encoded><![CDATA[<p>Daniel, you are very astute, thanks again for your help tracking this down. The reason I changed the attachment method slightly was because of the same problem using remove with the previous approach. So, it appears that the use of clone() is somewhat to blame. My understanding is that when an image fires it&#8217;s onload handler, you&#8217;d expect that all the other instances of this src location to be loaded. Is this not the case? Does a browser normally request the same resource more than once per page load, no matter the DOM manipulations? Are you running anything that changes the default cache operation of Firefox? Just curious, because I cannot reproduce this problem yet on fairly default configurations. I&#8217;m not testing on localhost but my internet connection is pretty zippy. What if you change boundx and boundy to be set from $origimg instead of $img a couple lines down?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://deepliquid.com/blog/archives/134/comment-page-1#comment-9747</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 06 Apr 2009 18:00:04 +0000</pubDate>
		<guid isPermaLink="false">http://deepliquid.com/blog/?p=134#comment-9747</guid>
		<description>you can verify this by adding the line:

$img.load(function() {console.log("Loaded!" + $img.height())});

right before 

$origimg.after($img).hide();</description>
		<content:encoded><![CDATA[<p>you can verify this by adding the line:</p>
<p>$img.load(function() {console.log(&#8221;Loaded!&#8221; + $img.height())});</p>
<p>right before </p>
<p>$origimg.after($img).hide();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://deepliquid.com/blog/archives/134/comment-page-1#comment-9746</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 06 Apr 2009 17:59:09 +0000</pubDate>
		<guid isPermaLink="false">http://deepliquid.com/blog/?p=134#comment-9746</guid>
		<description>I've found the source of the problem, and it is not browser dependent, but it is speed dependent, so testing on your localhost probably won't reproduce the problem...

when you clone(), you've created a copy of the dom objects in memory, but when you insert $img back into the page with the line:

$origimg.after($img).hide();

the html is reloaded, along with the image, i.e. the image actually loads again from the server.

So when you reference $img.height() two lines down, the image hasn't finished loading and isn't properly in the dom yet, so height returns 0.

I've solved it temporarily by going back to the last method of wraping $img with $div, although that creates problems for your destroy() function, which i solved somewhat along these lines: 

$test = $('div.' + cssClass('holder'));
$img.css({ position: 'relative' });
$test.after($img);
$test.remove();

which is certainly not optimal, but does the trick for me, and i'm not really using destroy() anyways, but disable() enable() are very useful thanks :)

-Dan</description>
		<content:encoded><![CDATA[<p>I&#8217;ve found the source of the problem, and it is not browser dependent, but it is speed dependent, so testing on your localhost probably won&#8217;t reproduce the problem&#8230;</p>
<p>when you clone(), you&#8217;ve created a copy of the dom objects in memory, but when you insert $img back into the page with the line:</p>
<p>$origimg.after($img).hide();</p>
<p>the html is reloaded, along with the image, i.e. the image actually loads again from the server.</p>
<p>So when you reference $img.height() two lines down, the image hasn&#8217;t finished loading and isn&#8217;t properly in the dom yet, so height returns 0.</p>
<p>I&#8217;ve solved it temporarily by going back to the last method of wraping $img with $div, although that creates problems for your destroy() function, which i solved somewhat along these lines: </p>
<p>$test = $(&#8217;div.&#8217; + cssClass(&#8217;holder&#8217;));<br />
$img.css({ position: &#8216;relative&#8217; });<br />
$test.after($img);<br />
$test.remove();</p>
<p>which is certainly not optimal, but does the trick for me, and i&#8217;m not really using destroy() anyways, but disable() enable() are very useful thanks :)</p>
<p>-Dan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://deepliquid.com/blog/archives/134/comment-page-1#comment-9729</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 06 Apr 2009 17:11:30 +0000</pubDate>
		<guid isPermaLink="false">http://deepliquid.com/blog/?p=134#comment-9729</guid>
		<description>placing in $(window).load() does not fix the issue for me...</description>
		<content:encoded><![CDATA[<p>placing in $(window).load() does not fix the issue for me&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://deepliquid.com/blog/archives/134/comment-page-1#comment-9722</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 06 Apr 2009 16:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://deepliquid.com/blog/?p=134#comment-9722</guid>
		<description>Thanks a lot for your help, Daniel. A critical issue is that the image has it's intended dimensions when Jcrop is initialized. Sometimes this happens by accident based on how quickly the images load, so that could lead to intermittent behavior not linked to a particular platform or browser. Jcrop is supposed to mitigate these problems, but looking back over that code it's a bit messy.

Try placing the invocation within $(window).load(...) instead of the typical DOM-ready handler. Does that fix the issue?</description>
		<content:encoded><![CDATA[<p>Thanks a lot for your help, Daniel. A critical issue is that the image has it&#8217;s intended dimensions when Jcrop is initialized. Sometimes this happens by accident based on how quickly the images load, so that could lead to intermittent behavior not linked to a particular platform or browser. Jcrop is supposed to mitigate these problems, but looking back over that code it&#8217;s a bit messy.</p>
<p>Try placing the invocation within $(window).load(&#8230;) instead of the typical DOM-ready handler. Does that fix the issue?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://deepliquid.com/blog/archives/134/comment-page-1#comment-9714</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 06 Apr 2009 16:19:19 +0000</pubDate>
		<guid isPermaLink="false">http://deepliquid.com/blog/?p=134#comment-9714</guid>
		<description>I can also report that if i assign $img.height and width to $origimg.height and width right after the clone(), everything works.</description>
		<content:encoded><![CDATA[<p>I can also report that if i assign $img.height and width to $origimg.height and width right after the clone(), everything works.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
