Traversing in a matrix taking on account the first "value"?

Hi! (note: posting links on imgur because of "new user" limitation)

So I've been using O-S-C for a while now, I've also been using Blender. Blender has this feature where - if you want to show/hide an object - you click on the first show/hide object you want to to show/hide and if you drag on the same column, you'll show/hide without affecting the ones you don't want to show/hide.

Blender example

Peek 2022-03-22 22-48

Let's say I want to set ON a bunch of channels, I could use a matrix and use the traversing function to add them quickly; the problem is: if I have a bunch of channels already ON, they would turn OFF with the current behavior (which I know is the expected behavior), so I found a way to add them without affecting the ones that are already ON or remove them without affecting the ones that are already OFF.

Current (expected) behavior

Requested option

Diff between my drag.js and default drag.js
@@ -27,6 +27,8 @@ function pointerDownHandler(event) {
 
         if (widget.getProp) event.traversingStack.firstType = widget.getProp('type')
 
+        if (widget) event.traversingStack.firstValue = widget.value
+
         if (local.mode === TRAVERSING_SAMEWIDGET) {
             if (local.type === '') {
                 local.type = event.traversingStack.firstType
@@ -87,8 +89,7 @@ function pointerMoveHandler(event) {
             triggerWidgetEvent(previousTarget, 'dragend', event)
         }
 
-
-        if (target && event.traversing) {
+        if (target && event.traversing && event.traversingStack.firstValue == target._drag_widget.value) {
             triggerWidgetEvent(target, previousTarget !== target ? 'draginit' : 'drag', event)
         }

I know this is definitely not the right way, I'm not a programmer or anything, but it just "works" for what I want to achieve. Don't know if it would add bugs, or unexpected behavior, or if anybody would find this useful at all. But here it is (The problem with doing it this way is that I don't know how to program it in a way that the default behavior could also be used :frowning:).

Hi,
I see your point, I'll put a pin on it and try to implement when I can.

1 Like