Comments (6)
@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.
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.
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 ofaway?
as geometric property, but it's more complex. And whetheraway?
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.
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.
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.
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)
- VID actors syntax errors are not caught
- Native builds do not run under Windows XP even with WindowsXP target: calls D3D11 which is not supported on XP HOT 5
- Promotion inconsistency in `min/max pair float`
- Using point2D! as SIZE for a TAB-PANEL makes its children not to be shown.
- GROUP-BOX frame is not always conforming to its size. HOT 3
- view in 0.65 : word result is not local
- False Positive! HOT 1
- Inside part of TAB-PANELs do not resize. HOT 2
- Extra slashes in file/url composition
- The IMAGE STYLE doesn't get its face color. HOT 9
- Custom panel actors completely overwrite the actors object. HOT 4
- MSDOS support, really? (Feature Request/Fix, or should rename the --target) HOT 6
- Words fail to stay local in blocks evaluated with loop block evaluator: repeat HOT 3
- Words fail to stay local in blocks evaluated with loop block evaluators: foreach HOT 3
- value? fails HOT 8
- WISH: DRAW command PEN should have option DOTTED HOT 3
- Point to point conversions are buggy HOT 1
- VID area blocked and slow on big text HOT 8
- New fix for area does not work with WRAP HOT 10
- `round/even/to` doesn't work on `money!`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from red.