Skip to content

Commit 2601c06

Browse files
committed
soulmates: Allow dragging with right click
1 parent fb6b9d7 commit 2601c06

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

src/variety/soulmates.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@
1111
play: ["number", "numexist", "objblank", "clear"]
1212
},
1313
autoedit_func: "qnum",
14-
autoplay_func: "qnum",
15-
14+
mouseinputAutoPlay: function() {
15+
if (this.btn === "right" && this.mousemove) {
16+
this.inputDot();
17+
} else if (this.mouseend && this.notInputted()) {
18+
this.mouseCell = null;
19+
this.inputqnum();
20+
}
21+
},
1622
inputDot: function() {
1723
this.inputFixedQsub(2);
1824
}
@@ -50,11 +56,11 @@
5056
},
5157

5258
prehook: {
53-
qsub: function() {
54-
return !this.isValid();
59+
qsub: function(num) {
60+
return num && (this.isEmpty() || this.isNum());
5561
},
56-
anum: function() {
57-
return !this.isValid();
62+
anum: function(num) {
63+
return num !== -1 && this.isEmpty();
5864
}
5965
},
6066

0 commit comments

Comments
 (0)