How to use the ve-sequence-utils.adjustBpsToReplaceOrInsert function in ve-sequence-utils

To help you get started, we’ve selected a few ve-sequence-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TeselaGen / openVectorEditor / src / commands / index.js View on Github external
let orginalSeq = isSelection
          ? getSequenceWithinRange(selectionLayer, sequence)
          : sequence;
        if (type.includes("flip")) {
          newSeq = invertString(orginalSeq);
        } else {
          newSeq = orginalSeq[func]();
        }
        if (newSeq !== orginalSeq) {
          !toastFired &&
            window.toastr.success(`Sequence Case Edited Successfully`);
          //don't trigger a mutation unless something has actually changed
          props.updateSequenceData({
            ...props.sequenceData,
            sequence: isSelection
              ? adjustBpsToReplaceOrInsert(
                  sequence,
                  newSeq,
                  selectionLayer,
                  false
                )
              : newSeq
          });
        }
      }
    };