Explorar el Código

mol-plugin: sequence view remove scrollTo behavior

David Sehnal hace 5 años
padre
commit
ce06375a92
Se han modificado 1 ficheros con 7 adiciones y 7 borrados
  1. 7 7
      src/mol-plugin/ui/sequence/sequence.tsx

+ 7 - 7
src/mol-plugin/ui/sequence/sequence.tsx

@@ -162,7 +162,7 @@ export class Sequence<P extends SequenceProps> extends PluginUIComponent<P> {
         const { markerArray } = this.props.sequenceWrapper;
         const hasNumbers = !this.props.hideSequenceNumbers, period = this.sequenceNumberPeriod;
 
-        let first: HTMLSpanElement | undefined;
+        // let first: HTMLSpanElement | undefined;
 
         let o = 0;
         for (let i = 0, il = markerArray.length; i < il; i++) {
@@ -171,17 +171,17 @@ export class Sequence<P extends SequenceProps> extends PluginUIComponent<P> {
             if (!span) return;
             o++;
 
-            if (!first && markerArray[i] > 0) {
-                first = span;
-            }
+            // if (!first && markerArray[i] > 0) {
+            //     first = span;
+            // }
 
             const backgroundColor = this.getBackgroundColor(markerArray[i]);
             if (span.style.backgroundColor !== backgroundColor) span.style.backgroundColor = backgroundColor;
         }
 
-        if (first) {
-            first.scrollIntoView({ block: 'nearest' });
-        }
+        // if (first) {
+        //     first.scrollIntoView({ block: 'nearest' });
+        // }
     }
 
     mouseMove = (e: React.MouseEvent) => {