From: gmungoc Date: Fri, 13 Dec 2019 16:42:05 +0000 (+0000) Subject: JAL-2422 'label' command to highlight ChimeraX residue on mouseover X-Git-Tag: Release_2_11_2_0~37^2~43 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f4a2cccc2d31e80c19af722d57d80591f8c7aa76;p=jalview.git JAL-2422 'label' command to highlight ChimeraX residue on mouseover --- diff --git a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java index c16ce13..01deea8 100644 --- a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java +++ b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java @@ -788,6 +788,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel return; } + boolean forChimeraX = viewer.isChimeraX(); StringBuilder cmd = new StringBuilder(128); boolean first = true; boolean found = false; @@ -802,18 +803,26 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel { if (first) { - cmd.append("rlabel #").append(cms.get(0).getModelNumber()) - .append(":"); + cmd.append(forChimeraX ? "label #" : "rlabel #"); } else { cmd.append(","); } first = false; - cmd.append(pdbResNum); - if (!chain.equals(" ")) + if (forChimeraX) + { + cmd.append(cms.get(0).getModelNumber()) + .append("/").append(chain).append(":").append(pdbResNum); + } + else { - cmd.append(".").append(chain); + cmd.append(cms.get(0).getModelNumber()) + .append(":").append(pdbResNum); + if (!chain.equals(" ") && !forChimeraX) + { + cmd.append(".").append(chain); + } } found = true; }