Giter Site home page Giter Site logo

Comments (6)

qtxie avatar qtxie commented on May 28, 2024 1

@luce80 Checking event/offset in the over event is a better option. You can know which edge the mouse cursor is on by checking event/offset and how far away from the edge.

from red.

hiiamboris avatar hiiamboris commented on May 28, 2024

Your test doesn't show it, but I now think what happens is face gets locked to enable dragging. So away? gets generated once LMB is up. So this is more a question of naming, we think of away? as geometric property, but it's more complex. And whether away? should be applied to the last event with LMB down, or like now - only after its release. And of how do we control the locking? Does OS even allow us or we have to check the offsets?

from red.

qtxie avatar qtxie commented on May 28, 2024

Your test doesn't show it, but I now think what happens is face gets locked to enable dragging. So away? gets generated once LMB is up. So this is more a question of naming, we think of away? as geometric property, but it's more complex. And whether away? should be applied to the last event with LMB down, or like now - only after its release. And of how do we control the locking? Does OS even allow us or we have to check the offsets?

We need a new option to control the locking.

from red.

qtxie avatar qtxie commented on May 28, 2024

Expected behavior
Even if LMB is down event/away? should return true when the mouse cursor exits the face boundaries.

@luce80 What's the use case for this?

from red.

luce80 avatar luce80 commented on May 28, 2024

I am trying to implement an area using rich-text. When I start selecting the text and then , while still selecting, I exit the boundaries I expect the text to scroll to be able to continue selecting (like you can do in this same GitHub editor...). To do this it would be nice if event/away? still works even when LMB is down.
P.S. my example shows that if you click on the gray base and then try to "drag" it, when you exit it event/away? remains false.

from red.

luce80 avatar luce80 commented on May 28, 2024

Ok, never mind, the fix was quite easy:

away?: func [face event][event/offset <> min max 0x0 event/offset face/size]

I spent more time writing in this issue.

from red.

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.