mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-23 17:30:44 +02:00
tweak animation some more + remove countdown
This commit is contained in:
@@ -383,10 +383,12 @@ const renderBindingHighlightForBindableElement = (
|
||||
context.save();
|
||||
context.translate(element.x + appState.scrollX, element.y + appState.scrollY);
|
||||
|
||||
const PROGRESS_RATIO = (1 / BIND_MODE_TIMEOUT) * remainingTime;
|
||||
|
||||
context.strokeStyle = "rgba(0, 0, 0, 0.2)";
|
||||
context.lineWidth = 1 / appState.zoom.value;
|
||||
context.setLineDash([4 / appState.zoom.value, 4 / appState.zoom.value]);
|
||||
context.lineDashOffset = 0;
|
||||
context.lineDashOffset = (-PROGRESS_RATIO * 10) / appState.zoom.value;
|
||||
|
||||
context.beginPath();
|
||||
context.ellipse(
|
||||
@@ -415,16 +417,6 @@ const renderBindingHighlightForBindableElement = (
|
||||
|
||||
context.fill();
|
||||
|
||||
// Draw countdown
|
||||
context.font = `${radius / 2}px sans-serif`;
|
||||
context.textAlign = "center";
|
||||
context.textBaseline = "middle";
|
||||
context.fillText(
|
||||
`${Math.round(remainingTime)}`,
|
||||
element.width / 2,
|
||||
element.height / 2,
|
||||
);
|
||||
|
||||
context.restore();
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user