fix(client): Handle null of rootEl in MkWindow.vue (#9326)
* fix(client): Handle null of rootEl in MkWindow.vue * comment Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
867e31c9ff
commit
88859cf67d
1 changed files with 7 additions and 0 deletions
|
@ -221,6 +221,8 @@ function onHeaderMousedown(evt: MouseEvent) {
|
||||||
// 上ハンドル掴み時
|
// 上ハンドル掴み時
|
||||||
function onTopHandleMousedown(evt) {
|
function onTopHandleMousedown(evt) {
|
||||||
const main = rootEl;
|
const main = rootEl;
|
||||||
|
// どういうわけかnullになることがある
|
||||||
|
if (main == null) return;
|
||||||
|
|
||||||
const base = evt.clientY;
|
const base = evt.clientY;
|
||||||
const height = parseInt(getComputedStyle(main, '').height, 10);
|
const height = parseInt(getComputedStyle(main, '').height, 10);
|
||||||
|
@ -247,6 +249,7 @@ function onTopHandleMousedown(evt) {
|
||||||
// 右ハンドル掴み時
|
// 右ハンドル掴み時
|
||||||
function onRightHandleMousedown(evt) {
|
function onRightHandleMousedown(evt) {
|
||||||
const main = rootEl;
|
const main = rootEl;
|
||||||
|
if (main == null) return;
|
||||||
|
|
||||||
const base = evt.clientX;
|
const base = evt.clientX;
|
||||||
const width = parseInt(getComputedStyle(main, '').width, 10);
|
const width = parseInt(getComputedStyle(main, '').width, 10);
|
||||||
|
@ -271,6 +274,7 @@ function onRightHandleMousedown(evt) {
|
||||||
// 下ハンドル掴み時
|
// 下ハンドル掴み時
|
||||||
function onBottomHandleMousedown(evt) {
|
function onBottomHandleMousedown(evt) {
|
||||||
const main = rootEl;
|
const main = rootEl;
|
||||||
|
if (main == null) return;
|
||||||
|
|
||||||
const base = evt.clientY;
|
const base = evt.clientY;
|
||||||
const height = parseInt(getComputedStyle(main, '').height, 10);
|
const height = parseInt(getComputedStyle(main, '').height, 10);
|
||||||
|
@ -295,6 +299,7 @@ function onBottomHandleMousedown(evt) {
|
||||||
// 左ハンドル掴み時
|
// 左ハンドル掴み時
|
||||||
function onLeftHandleMousedown(evt) {
|
function onLeftHandleMousedown(evt) {
|
||||||
const main = rootEl;
|
const main = rootEl;
|
||||||
|
if (main == null) return;
|
||||||
|
|
||||||
const base = evt.clientX;
|
const base = evt.clientX;
|
||||||
const width = parseInt(getComputedStyle(main, '').width, 10);
|
const width = parseInt(getComputedStyle(main, '').width, 10);
|
||||||
|
@ -366,6 +371,8 @@ function applyTransformLeft(left) {
|
||||||
|
|
||||||
function onBrowserResize() {
|
function onBrowserResize() {
|
||||||
const main = rootEl;
|
const main = rootEl;
|
||||||
|
if (main == null) return;
|
||||||
|
|
||||||
const position = main.getBoundingClientRect();
|
const position = main.getBoundingClientRect();
|
||||||
const browserWidth = window.innerWidth;
|
const browserWidth = window.innerWidth;
|
||||||
const browserHeight = window.innerHeight;
|
const browserHeight = window.innerHeight;
|
||||||
|
|
Loading…
Reference in a new issue