@teselagen/ove 0.5.26 → 0.5.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -122401,7 +122401,7 @@ function showFileDialog({ multiple = false, onSelect }) {
122401
122401
  }
122402
122402
  __name(showFileDialog, "showFileDialog");
122403
122403
  const name = "@teselagen/ove";
122404
- const version = "0.5.25";
122404
+ const version = "0.5.26";
122405
122405
  const main = "./src/index.js";
122406
122406
  const type = "module";
122407
122407
  const exports$1 = {
@@ -126443,12 +126443,14 @@ const editorClicked = /* @__PURE__ */ __name(function({
126443
126443
  shiftHeld,
126444
126444
  updateSelectionOrCaret: updateSelectionOrCaret2
126445
126445
  }) {
126446
+ console.log(`asdfasfwaofijaweofj`);
126446
126447
  const timeDif = (/* @__PURE__ */ new Date()).getTime() - dragInProgress;
126447
126448
  if (!dragInProgress || 200 > timeDif) {
126448
126449
  updateSelectionOrCaret2(shiftHeld, nearestCaretPos);
126449
126450
  }
126450
126451
  }, "editorClicked");
126451
126452
  const editorDragStarted = /* @__PURE__ */ __name(function(opts2) {
126453
+ console.log(`wewfwf`);
126452
126454
  document == null ? void 0 : document.body.classList.add("sequenceDragging");
126453
126455
  window.__veDragging = true;
126454
126456
  caretPositionOnDragStart = opts2.nearestCaretPos;
@@ -127856,14 +127858,50 @@ function VectorInteractionHOC(Component) {
127856
127858
  },
127857
127859
  "translationRightClicked"
127858
127860
  ));
127859
- __publicField(this, "featureDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
127860
- showAddOrEditAnnotationDialog({ type: "feature", annotation });
127861
+ __publicField(this, "featureDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
127862
+ const { doubleClickOverrides = {} } = this.props;
127863
+ let preventDefault2;
127864
+ if (doubleClickOverrides["featureDoubleClicked"]) {
127865
+ preventDefault2 = doubleClickOverrides["featureDoubleClicked"]({
127866
+ annotation,
127867
+ event
127868
+ });
127869
+ }
127870
+ if (!preventDefault2) {
127871
+ event.preventDefault();
127872
+ event.stopPropagation();
127873
+ showAddOrEditAnnotationDialog({ type: "feature", annotation });
127874
+ }
127861
127875
  }, "featureDoubleClicked"));
127862
- __publicField(this, "partDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
127863
- showAddOrEditAnnotationDialog({ type: "part", annotation });
127876
+ __publicField(this, "partDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
127877
+ const { doubleClickOverrides = {} } = this.props;
127878
+ let preventDefault2;
127879
+ if (doubleClickOverrides["partDoubleClicked"]) {
127880
+ preventDefault2 = doubleClickOverrides["partDoubleClicked"]({
127881
+ annotation,
127882
+ event
127883
+ });
127884
+ }
127885
+ if (!preventDefault2) {
127886
+ event.preventDefault();
127887
+ event.stopPropagation();
127888
+ showAddOrEditAnnotationDialog({ type: "part", annotation });
127889
+ }
127864
127890
  }, "partDoubleClicked"));
127865
- __publicField(this, "primerDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
127866
- showAddOrEditAnnotationDialog({ type: "primer", annotation });
127891
+ __publicField(this, "primerDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
127892
+ const { doubleClickOverrides = {} } = this.props;
127893
+ let preventDefault2;
127894
+ if (doubleClickOverrides["primerDoubleClicked"]) {
127895
+ preventDefault2 = doubleClickOverrides["primerDoubleClicked"]({
127896
+ annotation,
127897
+ event
127898
+ });
127899
+ }
127900
+ if (!preventDefault2) {
127901
+ event.preventDefault();
127902
+ event.stopPropagation();
127903
+ showAddOrEditAnnotationDialog({ type: "primer", annotation });
127904
+ }
127867
127905
  }, "primerDoubleClicked"));
127868
127906
  __publicField(this, "cutsiteDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
127869
127907
  showDialog({
@@ -134093,7 +134131,9 @@ function CircularView(props) {
134093
134131
  "svg",
134094
134132
  {
134095
134133
  key: "circViewSvg",
134134
+ onTouch: true,
134096
134135
  onClick: (event) => {
134136
+ console.log(`23232323`);
134097
134137
  instantiated && getNearestCursorPositionToMouseEvent(
134098
134138
  event,
134099
134139
  toPass,
@@ -146616,7 +146656,8 @@ const _Editor = class _Editor extends React$2.Component {
146616
146656
  key: activePanelId,
146617
146657
  fontHeightMultiplier: this.props.fontHeightMultiplier,
146618
146658
  rightClickOverrides: this.props.rightClickOverrides,
146619
- clickOverrides: this.props.clickOverrides
146659
+ clickOverrides: this.props.clickOverrides,
146660
+ doubleClickOverrides: this.props.doubleClickOverrides
146620
146661
  }), panelPropsToSpread), {
146621
146662
  editorName,
146622
146663
  isProtein: sequenceData2.isProtein,
package/index.es.js CHANGED
@@ -122383,7 +122383,7 @@ function showFileDialog({ multiple = false, onSelect }) {
122383
122383
  }
122384
122384
  __name(showFileDialog, "showFileDialog");
122385
122385
  const name = "@teselagen/ove";
122386
- const version = "0.5.25";
122386
+ const version = "0.5.26";
122387
122387
  const main = "./src/index.js";
122388
122388
  const type = "module";
122389
122389
  const exports$1 = {
@@ -126425,12 +126425,14 @@ const editorClicked = /* @__PURE__ */ __name(function({
126425
126425
  shiftHeld,
126426
126426
  updateSelectionOrCaret: updateSelectionOrCaret2
126427
126427
  }) {
126428
+ console.log(`asdfasfwaofijaweofj`);
126428
126429
  const timeDif = (/* @__PURE__ */ new Date()).getTime() - dragInProgress;
126429
126430
  if (!dragInProgress || 200 > timeDif) {
126430
126431
  updateSelectionOrCaret2(shiftHeld, nearestCaretPos);
126431
126432
  }
126432
126433
  }, "editorClicked");
126433
126434
  const editorDragStarted = /* @__PURE__ */ __name(function(opts2) {
126435
+ console.log(`wewfwf`);
126434
126436
  document == null ? void 0 : document.body.classList.add("sequenceDragging");
126435
126437
  window.__veDragging = true;
126436
126438
  caretPositionOnDragStart = opts2.nearestCaretPos;
@@ -127838,14 +127840,50 @@ function VectorInteractionHOC(Component2) {
127838
127840
  },
127839
127841
  "translationRightClicked"
127840
127842
  ));
127841
- __publicField(this, "featureDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
127842
- showAddOrEditAnnotationDialog({ type: "feature", annotation });
127843
+ __publicField(this, "featureDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
127844
+ const { doubleClickOverrides = {} } = this.props;
127845
+ let preventDefault2;
127846
+ if (doubleClickOverrides["featureDoubleClicked"]) {
127847
+ preventDefault2 = doubleClickOverrides["featureDoubleClicked"]({
127848
+ annotation,
127849
+ event
127850
+ });
127851
+ }
127852
+ if (!preventDefault2) {
127853
+ event.preventDefault();
127854
+ event.stopPropagation();
127855
+ showAddOrEditAnnotationDialog({ type: "feature", annotation });
127856
+ }
127843
127857
  }, "featureDoubleClicked"));
127844
- __publicField(this, "partDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
127845
- showAddOrEditAnnotationDialog({ type: "part", annotation });
127858
+ __publicField(this, "partDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
127859
+ const { doubleClickOverrides = {} } = this.props;
127860
+ let preventDefault2;
127861
+ if (doubleClickOverrides["partDoubleClicked"]) {
127862
+ preventDefault2 = doubleClickOverrides["partDoubleClicked"]({
127863
+ annotation,
127864
+ event
127865
+ });
127866
+ }
127867
+ if (!preventDefault2) {
127868
+ event.preventDefault();
127869
+ event.stopPropagation();
127870
+ showAddOrEditAnnotationDialog({ type: "part", annotation });
127871
+ }
127846
127872
  }, "partDoubleClicked"));
127847
- __publicField(this, "primerDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
127848
- showAddOrEditAnnotationDialog({ type: "primer", annotation });
127873
+ __publicField(this, "primerDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
127874
+ const { doubleClickOverrides = {} } = this.props;
127875
+ let preventDefault2;
127876
+ if (doubleClickOverrides["primerDoubleClicked"]) {
127877
+ preventDefault2 = doubleClickOverrides["primerDoubleClicked"]({
127878
+ annotation,
127879
+ event
127880
+ });
127881
+ }
127882
+ if (!preventDefault2) {
127883
+ event.preventDefault();
127884
+ event.stopPropagation();
127885
+ showAddOrEditAnnotationDialog({ type: "primer", annotation });
127886
+ }
127849
127887
  }, "primerDoubleClicked"));
127850
127888
  __publicField(this, "cutsiteDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
127851
127889
  showDialog({
@@ -134075,7 +134113,9 @@ function CircularView(props) {
134075
134113
  "svg",
134076
134114
  {
134077
134115
  key: "circViewSvg",
134116
+ onTouch: true,
134078
134117
  onClick: (event) => {
134118
+ console.log(`23232323`);
134079
134119
  instantiated && getNearestCursorPositionToMouseEvent(
134080
134120
  event,
134081
134121
  toPass,
@@ -146598,7 +146638,8 @@ const _Editor = class _Editor extends React__default$1.Component {
146598
146638
  key: activePanelId,
146599
146639
  fontHeightMultiplier: this.props.fontHeightMultiplier,
146600
146640
  rightClickOverrides: this.props.rightClickOverrides,
146601
- clickOverrides: this.props.clickOverrides
146641
+ clickOverrides: this.props.clickOverrides,
146642
+ doubleClickOverrides: this.props.doubleClickOverrides
146602
146643
  }), panelPropsToSpread), {
146603
146644
  editorName,
146604
146645
  isProtein: sequenceData2.isProtein,
package/index.umd.js CHANGED
@@ -150823,7 +150823,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
150823
150823
  }
150824
150824
  __name(showFileDialog, "showFileDialog");
150825
150825
  const name = "@teselagen/ove";
150826
- const version = "0.5.25";
150826
+ const version = "0.5.26";
150827
150827
  const main = "./src/index.js";
150828
150828
  const type = "module";
150829
150829
  const exports$1 = {
@@ -153260,12 +153260,14 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
153260
153260
  shiftHeld,
153261
153261
  updateSelectionOrCaret: updateSelectionOrCaret2
153262
153262
  }) {
153263
+ console.log(`asdfasfwaofijaweofj`);
153263
153264
  const timeDif = (/* @__PURE__ */ new Date()).getTime() - dragInProgress;
153264
153265
  if (!dragInProgress || 200 > timeDif) {
153265
153266
  updateSelectionOrCaret2(shiftHeld, nearestCaretPos);
153266
153267
  }
153267
153268
  }, "editorClicked");
153268
153269
  const editorDragStarted = /* @__PURE__ */ __name(function(opts2) {
153270
+ console.log(`wewfwf`);
153269
153271
  document == null ? void 0 : document.body.classList.add("sequenceDragging");
153270
153272
  window.__veDragging = true;
153271
153273
  caretPositionOnDragStart = opts2.nearestCaretPos;
@@ -154673,14 +154675,50 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
154673
154675
  },
154674
154676
  "translationRightClicked"
154675
154677
  ));
154676
- __publicField(this, "featureDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
154677
- showAddOrEditAnnotationDialog({ type: "feature", annotation });
154678
+ __publicField(this, "featureDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
154679
+ const { doubleClickOverrides = {} } = this.props;
154680
+ let preventDefault2;
154681
+ if (doubleClickOverrides["featureDoubleClicked"]) {
154682
+ preventDefault2 = doubleClickOverrides["featureDoubleClicked"]({
154683
+ annotation,
154684
+ event
154685
+ });
154686
+ }
154687
+ if (!preventDefault2) {
154688
+ event.preventDefault();
154689
+ event.stopPropagation();
154690
+ showAddOrEditAnnotationDialog({ type: "feature", annotation });
154691
+ }
154678
154692
  }, "featureDoubleClicked"));
154679
- __publicField(this, "partDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
154680
- showAddOrEditAnnotationDialog({ type: "part", annotation });
154693
+ __publicField(this, "partDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
154694
+ const { doubleClickOverrides = {} } = this.props;
154695
+ let preventDefault2;
154696
+ if (doubleClickOverrides["partDoubleClicked"]) {
154697
+ preventDefault2 = doubleClickOverrides["partDoubleClicked"]({
154698
+ annotation,
154699
+ event
154700
+ });
154701
+ }
154702
+ if (!preventDefault2) {
154703
+ event.preventDefault();
154704
+ event.stopPropagation();
154705
+ showAddOrEditAnnotationDialog({ type: "part", annotation });
154706
+ }
154681
154707
  }, "partDoubleClicked"));
154682
- __publicField(this, "primerDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
154683
- showAddOrEditAnnotationDialog({ type: "primer", annotation });
154708
+ __publicField(this, "primerDoubleClicked", /* @__PURE__ */ __name(({ event, annotation }) => {
154709
+ const { doubleClickOverrides = {} } = this.props;
154710
+ let preventDefault2;
154711
+ if (doubleClickOverrides["primerDoubleClicked"]) {
154712
+ preventDefault2 = doubleClickOverrides["primerDoubleClicked"]({
154713
+ annotation,
154714
+ event
154715
+ });
154716
+ }
154717
+ if (!preventDefault2) {
154718
+ event.preventDefault();
154719
+ event.stopPropagation();
154720
+ showAddOrEditAnnotationDialog({ type: "primer", annotation });
154721
+ }
154684
154722
  }, "primerDoubleClicked"));
154685
154723
  __publicField(this, "cutsiteDoubleClicked", /* @__PURE__ */ __name(({ annotation }) => {
154686
154724
  showDialog({
@@ -160910,7 +160948,9 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
160910
160948
  "svg",
160911
160949
  {
160912
160950
  key: "circViewSvg",
160951
+ onTouch: true,
160913
160952
  onClick: (event) => {
160953
+ console.log(`23232323`);
160914
160954
  instantiated && getNearestCursorPositionToMouseEvent(
160915
160955
  event,
160916
160956
  toPass,
@@ -172921,7 +172961,8 @@ ${seqDataToCopy}\r
172921
172961
  key: activePanelId,
172922
172962
  fontHeightMultiplier: this.props.fontHeightMultiplier,
172923
172963
  rightClickOverrides: this.props.rightClickOverrides,
172924
- clickOverrides: this.props.clickOverrides
172964
+ clickOverrides: this.props.clickOverrides,
172965
+ doubleClickOverrides: this.props.doubleClickOverrides
172925
172966
  }), panelPropsToSpread), {
172926
172967
  editorName,
172927
172968
  isProtein: sequenceData2.isProtein,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.5.26",
3
+ "version": "0.5.27",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -822,7 +822,9 @@ export function CircularView(props) {
822
822
  >
823
823
  <svg
824
824
  key="circViewSvg"
825
+ onTouch
825
826
  onClick={event => {
827
+ console.log(`23232323`)
826
828
  instantiated &&
827
829
  getNearestCursorPositionToMouseEvent(
828
830
  event,
@@ -589,6 +589,7 @@ export class Editor extends React.Component {
589
589
  fontHeightMultiplier={this.props.fontHeightMultiplier}
590
590
  rightClickOverrides={this.props.rightClickOverrides}
591
591
  clickOverrides={this.props.clickOverrides}
592
+ doubleClickOverrides={this.props.doubleClickOverrides}
592
593
  {...panelPropsToSpread}
593
594
  editorName={editorName}
594
595
  isProtein={sequenceData.isProtein}
package/src/style.css CHANGED
@@ -12,6 +12,9 @@
12
12
  font-style: normal;
13
13
  font-display: block;
14
14
  }
15
+ .veEditor {
16
+ cursor:'pointer'
17
+ }
15
18
  .ve-monospace-font {
16
19
  font-family: Menlo, Monaco, monospace;
17
20
  font-size: 10px;
@@ -73,6 +73,7 @@ export const editorClicked = function ({
73
73
  shiftHeld,
74
74
  updateSelectionOrCaret
75
75
  }) {
76
+ console.log(`asdfasfwaofijaweofj`)
76
77
  const timeDif = new Date().getTime() - dragInProgress;
77
78
  if (!dragInProgress || 200 > timeDif) {
78
79
  //if the drag is less than 200 ms it probably isn't a real drag!
@@ -82,6 +83,7 @@ export const editorClicked = function ({
82
83
  };
83
84
 
84
85
  export const editorDragStarted = function (opts) {
86
+ console.log(`wewfwf`)
85
87
  document?.body.classList.add("sequenceDragging"); //needed to prevent the input bubble from losing focus post user drag
86
88
  window.__veDragging = true;
87
89
 
@@ -1096,14 +1096,50 @@ function VectorInteractionHOC(Component /* options */) {
1096
1096
  "translationRightClicked"
1097
1097
  );
1098
1098
 
1099
- featureDoubleClicked = ({ annotation }) => {
1100
- showAddOrEditAnnotationDialog({ type: "feature", annotation });
1099
+ featureDoubleClicked = ({ event, annotation }) => {
1100
+ const { doubleClickOverrides = {} } = this.props;
1101
+ let preventDefault;
1102
+ if (doubleClickOverrides["featureDoubleClicked"]) {
1103
+ preventDefault = doubleClickOverrides["featureDoubleClicked"]({
1104
+ annotation,
1105
+ event
1106
+ });
1107
+ }
1108
+ if (!preventDefault) {
1109
+ event.preventDefault();
1110
+ event.stopPropagation();
1111
+ showAddOrEditAnnotationDialog({ type: "feature", annotation });
1112
+ }
1101
1113
  };
1102
- partDoubleClicked = ({ annotation }) => {
1103
- showAddOrEditAnnotationDialog({ type: "part", annotation });
1114
+ partDoubleClicked = ({ event, annotation }) => {
1115
+ const { doubleClickOverrides = {} } = this.props;
1116
+ let preventDefault;
1117
+ if (doubleClickOverrides["partDoubleClicked"]) {
1118
+ preventDefault = doubleClickOverrides["partDoubleClicked"]({
1119
+ annotation,
1120
+ event
1121
+ });
1122
+ }
1123
+ if (!preventDefault) {
1124
+ event.preventDefault();
1125
+ event.stopPropagation();
1126
+ showAddOrEditAnnotationDialog({ type: "part", annotation });
1127
+ }
1104
1128
  };
1105
- primerDoubleClicked = ({ annotation }) => {
1106
- showAddOrEditAnnotationDialog({ type: "primer", annotation });
1129
+ primerDoubleClicked = ({ event, annotation }) => {
1130
+ const { doubleClickOverrides = {} } = this.props;
1131
+ let preventDefault;
1132
+ if (doubleClickOverrides["primerDoubleClicked"]) {
1133
+ preventDefault = doubleClickOverrides["primerDoubleClicked"]({
1134
+ annotation,
1135
+ event
1136
+ });
1137
+ }
1138
+ if (!preventDefault) {
1139
+ event.preventDefault();
1140
+ event.stopPropagation();
1141
+ showAddOrEditAnnotationDialog({ type: "primer", annotation });
1142
+ }
1107
1143
  };
1108
1144
  cutsiteDoubleClicked = ({ annotation }) => {
1109
1145
  showDialog({
package/style.css CHANGED
@@ -11991,6 +11991,9 @@ tspan.vePart {
11991
11991
  font-style: normal;
11992
11992
  font-display: block;
11993
11993
  }
11994
+ .veEditor {
11995
+ cursor:'pointer'
11996
+ }
11994
11997
  .ve-monospace-font {
11995
11998
  font-family: Menlo, Monaco, monospace;
11996
11999
  font-size: 10px;