release/0.1.0.076-alpha #1

Merged
Ray merged 2 commits from release/0.1.0.076-alpha into master 2023-10-08 15:07:53 +00:00
3 changed files with 40 additions and 4 deletions
Showing only changes of commit 0adf438a62 - Show all commits

View File

@ -264,8 +264,23 @@ class BBTimeline {
if (a.Debug) console.log(event);
a.OnEventClick(this, e, event);
a.OnMouseDown(this, e, event);
});
a.ctx.canvas.addEventListener('click', function (e) {
if (!a.Enabled) {
return;
}
var event = a.FindEventsByCoords(e.offsetX, e.offsetY);
if (event == null) {
return;
}
if (a.Debug) console.log(event);
a.OnClick(this, e, event);
});
}
Invalidate(redrawAxis, redrawMarkers) {
@ -381,7 +396,10 @@ class BBTimeline {
return result;
}
OnEventClick(sender, e, event) {
OnMouseDown(sender, e, event) {
}
OnClick(sender, e, event) {
}

5
bbtimeline.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -124,8 +124,21 @@ textarea {
<script>
var timeline1 = new BBTimeline("myCanvas");
timeline1.OnEventClick = function(sender, e, event) {
// console.log(e);
timeline1.OnMouseDown = function(sender, e, event) {
LogInfo("");
LogInfo("OnMouseDown");
LogInfo(JSON.stringify(sender));
LogInfo(JSON.stringify(e));
LogInfo(JSON.stringify(event));
LogInfo("");
}
timeline1.OnClick = function(sender, e, event) {
LogInfo("");
LogInfo("OnClick");
LogInfo(JSON.stringify(sender));
LogInfo(JSON.stringify(e));
LogInfo(JSON.stringify(event));
LogInfo("");
}
SetToday();