<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1498</bug_id>
          
          <creation_ts>2024-02-04 20:34:43 +0100</creation_ts>
          <short_desc>GraphUI: Fix Picking Traversal throughout Groups in Z-Descending Order, testing Children and fallback to Group if positive</short_desc>
          <delta_ts>2024-02-05 16:50:39 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>GraphUI</product>
          <component>Core</component>
          <version>2.6.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>805</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs>ec5d278a51eaaf4062010df41cf23f884e4b715b
8df74578481431768b3c26294c6bd64ed7030ae5
43a7899fedf2a570d20b03848bf15710f30b7f26
4b5de7337d2b335d512a0ff969222f038b734b8b
0ac7b2e59d5b41302f8e0ec7596d8f44447cf0a1</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>7103</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2024-02-04 20:34:43 +0100</bug_when>
    <thetext>Current picking algo in Z-Ascending order worked only by chance, as it picked up any bottom node.

Proper algo is in Z-Descending order to block occluded (child) nodes:

for-all s : shapes
  p1 = testPicking(s)
  if ( s is Container ) {
    p2 = testPicking(s.childs)
    if( null != p2 ) {
      p1 = p2; // override w/ child prio
    }
  }
  return p1
}

Further, testPicking(shape) shall only return a positive shape,
if the event dispatching check (mouse-over, click, ..) 
signals end-of-traversal - as originally intended.

Overall philosophy is to pick the &apos;deepest&apos; child of a group
if responding, otherwise the next higher interactive group.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7104</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2024-02-05 11:55:12 +0100</bug_when>
    <thetext>Commit 43a7899fedf2a570d20b03848bf15710f30b7f26

Bug 1498: Change Top-Level Widget Mode: Register a top-level Group in Scene, where its zOffset gets adjusted when activated..

.. instead of having a non-working complicated callback orgy setup.

This also takes away the getAdjustedZ() overloading burden (or better uglyness) etc.

Hence Group&apos;s setWidgetMode(boolean) became:
- enableTopLevelWidget(Scene)
- disableTopLevelWidget()

The forwardActivation listener is still applied to all children
as well as isActive() is also still overloaded for same required behavior.

However, none of the children is set in &apos;widget mode&apos;
as well as the Group is simply added to (or removed from) 
the Scene&apos;s top-level Group list - the holder.

Scene&apos;s setActiveShape(Shape) and releaseActiveShape()
handle the top-level Group if affected, 
i.e. adding or zero&apos;ing its ZOffset.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7105</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2024-02-05 11:56:01 +0100</bug_when>
    <thetext>commit ec5d278a51eaaf4062010df41cf23f884e4b715b

    GraphUI Cleanup: Use TreeTool directly (Reduce virtl-funcs);  Fix typos; Use PointerListener for onClicked(), add onHover();
    
    Subsequent commits will fix complete cleanup where code was changed mostly regarding other issues.

+++

commit 8df74578481431768b3c26294c6bd64ed7030ae5

    Bug 1498: GraphUI: Adopt RangedSlider to new picking (coming up), simplifies code.

+++</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7108</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2024-02-05 12:16:16 +0100</bug_when>
    <thetext>commit 4b5de7337d2b335d512a0ff969222f038b734b8b (HEAD -&gt; master)

    Bug 1498: GraphUI: Fix Picking Traversal throughout Groups in Z-Descending Order, testing Children and fallback to Group if positive

.. fixed as described</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7111</commentid>
    <comment_count>4</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2024-02-05 16:50:39 +0100</bug_when>
    <thetext>(In reply to Sven Gothel from comment #1)
commit 0ac7b2e59d5b41302f8e0ec7596d8f44447cf0a1

Bug 1498: Refine Top-Level Widget Mode: Handle active-state by Scene, simplify and reduce runtime costs

Refines commit 43a7899fedf2a570d20b03848bf15710f30b7f26

Scene handles top-level active state via releaseActiveShape() and setActive(),
now calling into setActiveTopLevel() -&gt; dispatchActivationEvent().

Drop child&apos;s addActivationListener(forwardActivation) and isActive() override.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>