Skip to content

Conversation

@aminya
Copy link
Collaborator

@aminya aminya commented Nov 21, 2020

Fix error when the middle pane is 0 width

minimap-width

Fixes atom-community#15
Fixes #702

Originally posted at atom-community#13 (comment) by @UziTech

@aminya aminya added the bug label Nov 21, 2020
@aminya aminya force-pushed the squashed-minimap-4upstream branch from 4521c9d to 1c25474 Compare November 21, 2020 05:51
Copy link
Collaborator Author

@aminya aminya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not fix the issue yet.
squash

@aminya aminya marked this pull request as draft November 21, 2020 05:51
Copy link
Collaborator Author

@aminya aminya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these canvas.width and offscreenCanvas.width values calculated on the fly or they are cached/constant?

@UziTech
Copy link
Collaborator

UziTech commented Nov 21, 2020

I believe they are calculated

@aminya
Copy link
Collaborator Author

aminya commented Nov 21, 2020

Could you benchmark the call to them?

let t1 = window.performance.now()

// call to these

console.log(window.performance.now() - t1)

@UziTech
Copy link
Collaborator

UziTech commented Nov 21, 2020

I got .07 with the if and .09 without lol so it must be constant

let t1 = window.performance.now()
layer.copyPartFromOffscreen(50, 100, 150)
console.log(window.performance.now() - t1)

@aminya
Copy link
Collaborator Author

aminya commented Nov 21, 2020

Sounds good. I will test this tomorrow if I find some time.

@aminya aminya force-pushed the squashed-minimap-4upstream branch from 5909ffb to 1ec8f12 Compare November 21, 2020 19:28
@aminya aminya marked this pull request as ready for review November 21, 2020 19:29
@aminya aminya merged commit 53ef5e1 into atom-minimap:master Nov 21, 2020
@github-actions
Copy link

🎉 This PR is included in version 4.31.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants