mirror of
https://github.com/geohot/qira
synced 2025-02-22 01:14:08 +03:00
right click to delete forks, no more trash
This commit is contained in:
parent
d1e68d84fa
commit
043490efe2
@ -54,7 +54,6 @@ function register_drag_zoom() {
|
||||
return clret;
|
||||
}
|
||||
function get_forknum(e) {
|
||||
if (e.target.id == "trash") return -1;
|
||||
var fn = e.target.id.split("vtimeline")[1];
|
||||
if (fn == "box") return -1;
|
||||
return parseInt(fn);
|
||||
@ -70,15 +69,18 @@ function register_drag_zoom() {
|
||||
downforknum = get_forknum(e);
|
||||
return false;
|
||||
});
|
||||
$("#vtimelinebox").contextmenu(function(e) {
|
||||
// right click to delete forks
|
||||
forknum = get_forknum(e);
|
||||
if (forknum != -1) {
|
||||
stream.emit("deletefork", forknum);
|
||||
redraw_flags();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$("#vtimelinebox").mouseup(function(e) {
|
||||
p("mouseup");
|
||||
if (e.button != 0) return;
|
||||
if (e.target.id == "trash" && downforknum != -1) {
|
||||
stream.emit("deletefork", downforknum);
|
||||
redraw_flags();
|
||||
return;
|
||||
}
|
||||
|
||||
var up = get_clnum(e);
|
||||
if (up === undefined) return;
|
||||
var forknum = get_forknum(e);
|
||||
|
@ -4,9 +4,6 @@
|
||||
|
||||
<body>
|
||||
<div id="vtimelinebox">
|
||||
<!--<div class="vtimeline" id="vtimeline0"></div>
|
||||
<div class="vtimeline" id="vtimeline1"></div>-->
|
||||
<div id="trash">delete</div>
|
||||
</div>
|
||||
<div id="onlypanel">
|
||||
<div id="controls">
|
||||
|
@ -1,7 +1,7 @@
|
||||
(function(){
|
||||
UI.body.contentParts.push(UI.Component.extend({render: (function() {
|
||||
var self = this;
|
||||
return [ HTML.Raw('<div id="vtimelinebox">\n<!--<div class="vtimeline" id="vtimeline0"></div>\n<div class="vtimeline" id="vtimeline1"></div>-->\n<div id="trash">delete</div>\n</div>\n'), HTML.DIV({
|
||||
return [ HTML.Raw('<div id="vtimelinebox">\n</div>\n'), HTML.DIV({
|
||||
id: "onlypanel"
|
||||
}, "\n", HTML.DIV({
|
||||
id: "controls"
|
||||
|
Loading…
x
Reference in New Issue
Block a user