Code Monkey home page Code Monkey logo

Comments (10)

royludo avatar royludo commented on June 14, 2024

@ugurdogrusoz The mouse cursor for that is set in the node-resize extension, through the ocanvas library. I tried to use a custom image, but this library doesn't seem to have support for that. Only for the defaults cursors. I emailed the developer to ask him. If nothing is done on this library's part, I think it may be overly difficult to do that.

from newt.

kinimesi avatar kinimesi commented on June 14, 2024

@ugurdogrusoz @royludo Setting a custom image in PNG format works (I could not get an SVG image to work). @royludo try: canvas.mouse.cursor("url('http://image.flaticon.com/icons/png/128/70/70358.png')");

Edit: It probably depends on the version of SVG. A working SVG example: https://gist.github.com/jhermsmeier/4565167

from newt.

royludo avatar royludo commented on June 14, 2024

@kinimesi ha, I should have thought about that. I'll find some nice png image, I don't even know why we went for svg. Thanks.

from newt.

kinimesi avatar kinimesi commented on June 14, 2024

@royludo SVG images are scalable, that is why we prefer them.

I think that is a good one: http://www.flaticon.com/free-icon/cancel_97603

In order to make SVG files work we need to add width and height values into it.

from newt.

ugurdogrusoz avatar ugurdogrusoz commented on June 14, 2024

Let's please decrease the size of this icon by 1/4 or 1/3 to be compatible with other grapple icons.

from newt.

ugurdogrusoz avatar ugurdogrusoz commented on June 14, 2024

I think grapples for resize are even smaller on Mac, you might want to make disable icon even smaller

from newt.

ugurdogrusoz avatar ugurdogrusoz commented on June 14, 2024

OK I checked with Windows as well. The situation is (using Chrome on both):

  • inactive cursor is smaller than others on Windows
  • inactive cursor is larger than others on Mac
    So I don't know what to suggest. How come different cursors are used on Windows and Mac?

from newt.

kinimesi avatar kinimesi commented on June 14, 2024

There is no way to get current cursor size and set disabled grapple icon size accordingly. I set it to 15x15, which looks reasonable on Windows and Mac. See 66ee87d

from newt.

kinimesi avatar kinimesi commented on June 14, 2024

Should we fill inside of current icon? It is transparent right now.

from newt.

ugurdogrusoz avatar ugurdogrusoz commented on June 14, 2024

yes let's make it non-transparent.
i think what we have is fine regarding icon dimensions.

from newt.

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.