fix: firefox bugs
This commit is contained in:
parent
6ce4da519b
commit
b29076afed
717
dist/frappe-gantt.js
vendored
717
dist/frappe-gantt.js
vendored
File diff suppressed because it is too large
Load Diff
22
dist/frappe-gantt.umd.cjs
vendored
22
dist/frappe-gantt.umd.cjs
vendored
File diff suppressed because one or more lines are too long
@ -309,7 +309,7 @@ export default class Bar {
|
|||||||
'mouseenter',
|
'mouseenter',
|
||||||
(e) =>
|
(e) =>
|
||||||
(timeout = setTimeout(() => {
|
(timeout = setTimeout(() => {
|
||||||
this.show_popup(e.offsetX);
|
this.show_popup(e.offsetX || e.layerX);
|
||||||
document.getElementById(
|
document.getElementById(
|
||||||
`${task_id}-highlight`,
|
`${task_id}-highlight`,
|
||||||
).style.display = 'block';
|
).style.display = 'block';
|
||||||
|
|||||||
15
src/index.js
15
src/index.js
@ -975,8 +975,8 @@ export default class Gantt {
|
|||||||
|
|
||||||
if (this.popup) this.popup.parent.classList.add('hidden');
|
if (this.popup) this.popup.parent.classList.add('hidden');
|
||||||
|
|
||||||
x_on_start = e.offsetX;
|
x_on_start = e.offsetX || e.layerX;
|
||||||
y_on_start = e.offsetY;
|
y_on_start = e.offsetY || e.layerY;
|
||||||
|
|
||||||
parent_bar_id = bar_wrapper.getAttribute('data-id');
|
parent_bar_id = bar_wrapper.getAttribute('data-id');
|
||||||
const ids = [
|
const ids = [
|
||||||
@ -1064,8 +1064,8 @@ export default class Gantt {
|
|||||||
|
|
||||||
$.on(this.$svg, 'mousemove', (e) => {
|
$.on(this.$svg, 'mousemove', (e) => {
|
||||||
if (!action_in_progress()) return;
|
if (!action_in_progress()) return;
|
||||||
const dx = e.offsetX - x_on_start;
|
console.log(e)
|
||||||
const dy = e.offsetY - y_on_start;
|
const dx = (e.offsetX || e.layerX) - x_on_start;
|
||||||
|
|
||||||
bars.forEach((bar) => {
|
bars.forEach((bar) => {
|
||||||
const $bar = bar.$bar;
|
const $bar = bar.$bar;
|
||||||
@ -1123,8 +1123,8 @@ export default class Gantt {
|
|||||||
|
|
||||||
$.on(this.$svg, 'mousedown', '.handle.progress', (e, handle) => {
|
$.on(this.$svg, 'mousedown', '.handle.progress', (e, handle) => {
|
||||||
is_resizing = true;
|
is_resizing = true;
|
||||||
x_on_start = e.offsetX;
|
x_on_start = e.offsetX || e.layerX;
|
||||||
y_on_start = e.offsetY;
|
y_on_start = e.offsetY || e.layerY;
|
||||||
|
|
||||||
const $bar_wrapper = $.closest('.bar-wrapper', handle);
|
const $bar_wrapper = $.closest('.bar-wrapper', handle);
|
||||||
const id = $bar_wrapper.getAttribute('data-id');
|
const id = $bar_wrapper.getAttribute('data-id');
|
||||||
@ -1141,8 +1141,7 @@ export default class Gantt {
|
|||||||
|
|
||||||
$.on(this.$svg, 'mousemove', (e) => {
|
$.on(this.$svg, 'mousemove', (e) => {
|
||||||
if (!is_resizing) return;
|
if (!is_resizing) return;
|
||||||
let dx = e.offsetX - x_on_start;
|
let dx = (e.offsetX || e.layerX) - x_on_start;
|
||||||
let dy = e.offsetY - y_on_start;
|
|
||||||
|
|
||||||
if (dx > $bar_progress.max_dx) {
|
if (dx > $bar_progress.max_dx) {
|
||||||
dx = $bar_progress.max_dx;
|
dx = $bar_progress.max_dx;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user