Files
NapCatQQ/.pnpm-store/v3/files/ea/284e82f691a317c44cf85078669ae4cc5f02d878e48a6ff0e6fa30adfd445b42713b594f590c989bdd9e007846e6c94f03fd9a9930ce2e36c235038508b0e6
T
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

60 lines
3.2 KiB
Plaintext

var $ee0bdf4faa47f2a8$exports = require("./utils.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "DOMLayoutDelegate", () => $2ac4508142683dcb$export$8f5ed9ff9f511381);
/*
* Copyright 2024 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
class $2ac4508142683dcb$export$8f5ed9ff9f511381 {
getItemRect(key) {
let container = this.ref.current;
if (!container) return null;
let item = key != null ? (0, $ee0bdf4faa47f2a8$exports.getItemElement)(this.ref, key) : null;
if (!item) return null;
let containerRect = container.getBoundingClientRect();
let itemRect = item.getBoundingClientRect();
return {
x: itemRect.left - containerRect.left - container.clientLeft + container.scrollLeft,
y: itemRect.top - containerRect.top - container.clientTop + container.scrollTop,
width: itemRect.width,
height: itemRect.height
};
}
getContentSize() {
let container = this.ref.current;
var _container_scrollWidth, _container_scrollHeight;
return {
width: (_container_scrollWidth = container === null || container === void 0 ? void 0 : container.scrollWidth) !== null && _container_scrollWidth !== void 0 ? _container_scrollWidth : 0,
height: (_container_scrollHeight = container === null || container === void 0 ? void 0 : container.scrollHeight) !== null && _container_scrollHeight !== void 0 ? _container_scrollHeight : 0
};
}
getVisibleRect() {
let container = this.ref.current;
var _container_scrollLeft, _container_scrollTop, _container_clientWidth, _container_clientHeight;
return {
x: (_container_scrollLeft = container === null || container === void 0 ? void 0 : container.scrollLeft) !== null && _container_scrollLeft !== void 0 ? _container_scrollLeft : 0,
y: (_container_scrollTop = container === null || container === void 0 ? void 0 : container.scrollTop) !== null && _container_scrollTop !== void 0 ? _container_scrollTop : 0,
width: (_container_clientWidth = container === null || container === void 0 ? void 0 : container.clientWidth) !== null && _container_clientWidth !== void 0 ? _container_clientWidth : 0,
height: (_container_clientHeight = container === null || container === void 0 ? void 0 : container.clientHeight) !== null && _container_clientHeight !== void 0 ? _container_clientHeight : 0
};
}
constructor(ref){
this.ref = ref;
}
}
//# sourceMappingURL=DOMLayoutDelegate.main.js.map