Giter VIP home page Giter VIP logo

Comments (8)

imgorosabel avatar imgorosabel commented on May 14, 2024

Hi again! I've found the issue. The problem was I have a computer with retina display, and since the pixel density is double, the canvas was literally divided by two. I've fixed it by adding to the return of the function buildBounds the multiplier window.devicePixelRatio:

return {x: x, y: y, xMax: width * window.devicePixelRatio, yMax: yMax * window.devicePixelRatio, width: width * window.devicePixelRatio, height: height * window.devicePixelRatio};

from wind-layer.

imgorosabel avatar imgorosabel commented on May 14, 2024

It's not fixed yet. Now the bounds are ok, but the particle origin, bucket and endpoint is still the way it was before. This only happens with retina displays :(

from wind-layer.

sakitam-fdd avatar sakitam-fdd commented on May 14, 2024

@imgorosabel Can you provide the system version and browser version?

from wind-layer.

imgorosabel avatar imgorosabel commented on May 14, 2024

@imgorosabel Can you provide the system version and browser version?

Mac OS X 10.14.6 and Firefox 70.0.1, but the same happens with Chrome 78.0.3904.108

from wind-layer.

sakitam-fdd avatar sakitam-fdd commented on May 14, 2024

@imgorosabel Ok, will check the problem in these two days

from wind-layer.

imgorosabel avatar imgorosabel commented on May 14, 2024

Great! Many thanks, if I can help you somehow let me know

from wind-layer.

sakitam-fdd avatar sakitam-fdd commented on May 14, 2024

@imgorosabel
Temporarily added a devicepixelratio parameter,But this can only solve the problem temporarily, not the optimal solution. Please keep paying attention.

new OlWind(data, {
      layerName: 'data',
      projection: 'EPSG:4326',
      devicePixelRatio: window.devicePixelRatio,
      map: map,
      colorScale: [
        "rgb(36,104, 180)",
        "rgb(60,157, 194)",
        "rgb(128,205,193 )",
        "rgb(151,218,168 )",
        "rgb(198,231,181)",
        "rgb(238,247,217)",
        "rgb(255,238,159)",
        "rgb(252,217,125)",
        "rgb(255,182,100)",
        "rgb(252,150,75)",
        "rgb(250,112,52)",
        "rgb(245,64,32)",
        "rgb(237,45,28)",
        "rgb(220,24,32)",
        "rgb(180,0,35)"
      ],
      minVelocity: 0,
      maxVelocity: 10,
      velocityScale: 0.05,
      particleAge: 90,
      lineWidth: 1,
      particleMultiplier: 0.01,
    });

from wind-layer.

imgorosabel avatar imgorosabel commented on May 14, 2024

Thanks, it works!! MANY MANY Thanks! I'll check for future updates

from wind-layer.

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.