Giter Club home page Giter Club logo

Comments (14)

jasondavies avatar jasondavies commented on May 18, 2024

Do you have some example code or a page that reproduces the problem?

from d3-cloud.

mafazr avatar mafazr commented on May 18, 2024

Simply try navigating to the following link via mobile safari on iPhone
device, you will get an idea of my issue:

http://www.jasondavies.com/wordcloud/#http%3A%2F%2Fsearch.twitter.com%2Fsearch.json%3Frpp%3D100%26q%3D%7Bword%7D=cloud

Thank you.

On Tue, Mar 12, 2013 at 7:26 PM, Jason Davies [email protected]:

Do you have some example code or a page that reproduces the problem?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-14776194
.

Mafaz Abdul Rouf
( www.about.me/mafazrouf )

from d3-cloud.

jasondavies avatar jasondavies commented on May 18, 2024

Works fine for me in a simulator under iOS 6.1. Which version of iOS/Safari are you using?

from d3-cloud.

mafazr avatar mafazr commented on May 18, 2024

I am using iOS 6.0 safari. It does work perfectly in the simulator for me
too, the problem comes when it is loaded into the device. I am using iPod
touch for testing.

On Tue, Mar 12, 2013 at 7:49 PM, Jason Davies [email protected]:

Works fine for me in a simulator under iOS 6.1. Which version of
iOS/Safari are you using?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-14777553
.

Mafaz Abdul Rouf
( www.about.me/mafazrouf )

from d3-cloud.

jasondavies avatar jasondavies commented on May 18, 2024

I’ll try simulating iOS 6.0 and see if that makes a difference. Did you notice any errors being logged to the console?

from d3-cloud.

mafazr avatar mafazr commented on May 18, 2024

No errors logged and works smoothly on iOS 6.0 simulator but when rendered
to the device, it simply doesn't show up. And when the first mentioned
function is commented out, the words become visible but overlaps each other
making it illegible.

On Tue, Mar 12, 2013 at 7:56 PM, Jason Davies [email protected]:

I’ll try simulating iOS 6.0 and see if that makes a difference. Did you
notice any errors being logged to the console?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-14777916
.

Mafaz Abdul Rouf
( www.about.me/mafazrouf )

from d3-cloud.

jasondavies avatar jasondavies commented on May 18, 2024

Can you confirm what version of iOS the device is running? iOS 6.0 too?

from d3-cloud.

mafazr avatar mafazr commented on May 18, 2024

Yes, iOS 6.0 itself.

-Mafaz Rouf
-typed with my opposable thumbs!
On Mar 12, 2013 8:01 PM, "Jason Davies" [email protected] wrote:

Can you confirm what version of iOS the device is running? iOS 6.0 too?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-14778193
.

from d3-cloud.

jasondavies avatar jasondavies commented on May 18, 2024

It’s possible that the device is simply too slow as it’s fairly resource intensive.

Can you try this simple word cloud on your device for comparison? http://www.jasondavies.com/wordcloud/simple.html

from d3-cloud.

mafazr avatar mafazr commented on May 18, 2024

Had thought that could be the reason, but couldn't confirm. Will test on an
i Phone asap.

Thanks alot for your instantaneous response. :)

-Mafaz Rouf
-typed with my opposable thumbs!
On Mar 12, 2013 8:08 PM, "Jason Davies" [email protected] wrote:

It’s possible that the device is simply too slow as it’s fairly resource
intensive.

Can you try this simple word cloud on your device for comparison?
http://www.jasondavies.com/wordcloud/simple.html


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-14778570
.

from d3-cloud.

mafazr avatar mafazr commented on May 18, 2024

Tried the simple link on my device and the same problem persists, only one
word is shown.

-Mafaz Rouf
-typed with my opposable thumbs!
On Mar 12, 2013 8:08 PM, "Jason Davies" [email protected] wrote:

It’s possible that the device is simply too slow as it’s fairly resource
intensive.

Can you try this simple word cloud on your device for comparison?
http://www.jasondavies.com/wordcloud/simple.html


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-14778570
.

from d3-cloud.

bartdegoede avatar bartdegoede commented on May 18, 2024

I had a similar problem in Firefox 20.0, where the break in the while loop in the place function is never reached. As a very quick and ugly fix, a counter and an extra condition worked for me.

Note.: As of Firefox 22.0 I didn't experience this issue anymore

function place(board, tag, bounds) {
    var perimeter = [{x: 0, y: 0}, {x: size[0], y: size[1]}],
          startX = tag.x,
          startY = tag.y,
          maxDelta = Math.sqrt(size[0] * size[0] + size[1] * size[1]),
          s = spiral(size),
          dt = Math.random() < .5 ? 1 : -1,
          t = -dt,
          dxdy,
          dx,
          dy;

    // Ugly hack to prevent ending up in an infinite loop in Firefox
    counter = 0;
    while (dxdy = s(t += dt)) {
      dx = ~~dxdy[0];
      dy = ~~dxdy[1];

      if (Math.min(dx, dy) > maxDelta || counter > 100000) break;
      counter++;

from d3-cloud.

jasondavies avatar jasondavies commented on May 18, 2024

Unable to reproduce on iPad/Safari/iOS 6.0, so closing for now. I tested the simple demo.

from d3-cloud.

jkristoffer avatar jkristoffer commented on May 18, 2024

I encountered a similar issue whereby the place function goes into an infinite loop.
I have a SPA, one of my views contains a WordCloud instance. If I allow the WordCloud to finish loading it works just fine. However, if I navigate away from the view before the WordCloud finishes rendering, it goes into an infinite loop and crashes the browser.


EDIT:
Narrowed it down to the size variable containing a less than 1 value.

from d3-cloud.

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.