mirror of
https://github.com/Retropex/bitfeed.git
synced 2025-05-13 03:30:47 +02:00
Fix subpixel grid sizes
This commit is contained in:
parent
a368640682
commit
2a88138ce7
@ -3,7 +3,7 @@ import config from '../config.js'
|
||||
|
||||
class TxStream {
|
||||
constructor () {
|
||||
this.websocketUri = (config.dev ? `ws://localhost:5000${config.websocket_path}` : `wss://${window.location.host}${config.websocket_path}`)
|
||||
this.websocketUri = config.localSocket ? `ws://localhost:4000${config.websocket_path}` : (config.dev ? `wss://bits.monospace.live${config.websocket_path}` : `wss://${window.location.host}${config.websocket_path}`)
|
||||
this.reconnectBackoff = 128
|
||||
this.websocket = null
|
||||
this.setConnected(false)
|
||||
|
@ -40,8 +40,8 @@ export default class TxPoolScene {
|
||||
resize ({ width = this.width, height = this.height }) {
|
||||
this.width = width
|
||||
this.height = height
|
||||
this.unitWidth = Math.max(4, width / 250)
|
||||
this.unitPadding = Math.max(1, width / 1000)
|
||||
this.unitWidth = Math.floor(Math.max(4, width / 250))
|
||||
this.unitPadding = Math.floor(Math.max(1, width / 1000))
|
||||
this.gridSize = this.unitWidth + (this.unitPadding * 2)
|
||||
this.blockWidth = (Math.floor(width / this.gridSize) - 1)
|
||||
this.blockHeight = (Math.floor(height / this.gridSize) - 1)
|
||||
|
Loading…
Reference in New Issue
Block a user