mirror of
https://github.com/YGGverse/YGGwave.git
synced 2025-03-12 21:31:21 +00:00
improve the coordinates system
This commit is contained in:
parent
033fefc196
commit
435507bffc
@ -25,7 +25,7 @@
|
||||
|
||||
$result[] = sprintf('<div style="top:%s%%;left:%s%%">%s</div>',
|
||||
self::_getSignalPosition($hash),
|
||||
self::_getSignalPosition($hash),
|
||||
self::_getSignalPosition($hash, true),
|
||||
sprintf('<a target="_blank"
|
||||
href="%s"
|
||||
title="%s">%s</a>', htmlspecialchars($data[2]),
|
||||
@ -44,9 +44,9 @@
|
||||
return $result;
|
||||
}
|
||||
|
||||
private static function _getSignalPosition($hash, $padding = 20) {
|
||||
private static function _getSignalPosition(int $hash, bool $reverse = false, int $padding = 20) {
|
||||
|
||||
$variant = str_split($hash, 2);
|
||||
$variant = $reverse ? array_reverse(str_split($hash, 2)) : str_split($hash, 2);
|
||||
|
||||
$version = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user