Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Jul 29, 2019. It is now read-only.
/visPublic archive

Selection box#4242

Open
softwareCobbler wants to merge11 commits intoalmende:develop
base:develop
Choose a base branch
Loading
fromsoftwareCobbler:selectionBox
Open

Selection box#4242

softwareCobbler wants to merge11 commits intoalmende:developfromsoftwareCobbler:selectionBox

Conversation

softwareCobbler
Copy link

This implements a "selectionBox" feature in Network's interaction module. With this option enabled, the user can press CTRL and left click and then drag a box around the canvas. Let go and it selects the nodes and/or edges within the box (there are option flags the user can set to have it select nodes / edges).
Open to feedback!
This was briefly discussed in#4233.
Thanks!
sbox

mojoaxel and jgorene reacted with thumbs up emoji
@softwareCobbler
Copy link
Author

Quick video example of feature

mojoaxel reacted with heart emoji

@jgorene
Copy link

A priori, I didn't encounter any bugs at least after a few tests.
Subject to further testing, this seems ready to be implemented at the latest on v4.22.
Good work !

@softwareCobbler
Copy link
Author

softwareCobbler commentedFeb 5, 2019
edited
Loading

considering the line width option - sinceCanvasRenderingContext2D.lineWidth is in coordinate space, I'm not certain how to provide a sane default. The value the user provides will change in apparent thickness as the zoom scale changes. Recalculating upon camera scale changes is the obvious solution, but I don't know quite what units the user expects to see.
Should a value of1.0 always be 1 screen pixel? Or 1% of the total canvas area?

@jgorene
Copy link

@softwareCobbler Indeed and it's already very good like that, no problem 😌
I still have a lot to learn and it will take me a little more time to properly analyze the new option , anyway.

@mojoaxel Just by the way and nothing to do with this new interaction option but it seems that "zoomSpeed" option is obsolete... but maybe I missed something?

@softwareCobbler
Copy link
Author

Got thelineWidth option up and running for this:

  • It is a value in screen pixels, the canvas zoom should not affect the pixel count.
  • lineWidth is kept greater than or equal to zero (negative values are forced to 0), and while the user can pass in real numbers, the passed-in values are rounded down to the nearest integer.
  • a zero value means we draw no border, and just fill in the appropriatefillRect
  • canvas bounds clamping has been adjusted to deal with different sizedlineWidth's
jgorene reacted with thumbs up emoji

@@ -541,6 +541,7 @@ ItemSet.prototype.show = function() {

/**
* Activates the popup timer to show the given popup after a fixed time.
* @param {any} popup
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

cherry-picked this into#4256 to provide a more logical separation of concern (it's a bit out of place in this PR)

mojoaxel reacted with heart emoji
@mojoaxelmojoaxel self-assigned thisFeb 8, 2019
@mojoaxelmojoaxel added this to theMinor Release v4.22 milestoneFeb 8, 2019
This reverts commitf2bec3e (refalmende/vis PR#4256
@mojoaxelmojoaxel self-requested a reviewFebruary 19, 2019 21:01
@mojoaxel
Copy link
Member

@softwareCobbler Please consider moving this pull-request over tovis-network! Also we are always looking for people that might be interesting in helping maintaining 😉

@softwareCobbler
Copy link
Author

softwareCobbler commentedJul 23, 2019 via email

Haha thought it was DOA--when I can scrape together some time I'd be happyto.Thanks,Dave R.
On Tue, Jul 23, 2019, 7:41 AM Alexander Wunschik ***@***.***> wrote:@softwareCobbler <https://github.com/softwareCobbler> Please consider moving this pull-request over to vis-network <https://github.com/visjs/vis-network>! Also we are always looking for people that might be interesting in helping maintaining 😉 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#4242?email_source=notifications&email_token=AEPAW2ACVLDDXO4ZWMQM46LQA34BNA5CNFSM4GT7NWR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2S7LHI#issuecomment-514192797>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AEPAW2FQFAAAHQD6V3UXROLQA34BNANCNFSM4GT7NWRQ> .
mojoaxel reacted with heart emoji

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mojoaxelmojoaxelmojoaxel left review comments

Assignees

@mojoaxelmojoaxel

Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
@softwareCobbler@jgorene@mojoaxel

[8]ページ先頭

©2009-2025 Movatter.jp