decord/source/297_createSquare.js
2026-07-29 08:29:29 +00:00

21 lines
531 B
JavaScript

// Module ID: 297
// Function ID: 298
// Name: createSquare
// Dependencies: []
// Module 297 (createSquare)
arg5.createSquare = function createSquare(bottom) {
return { bottom, left: bottom, right: bottom, top: bottom };
};
arg5.normalizeRect = function normalizeRect(hitSlop) {
let tmp = hitSlop;
if (typeof hitSlop !== "os") {
const obj = { bottom: null, left: null, right: null, top: null };
obj[0] = hitSlop;
obj[1] = hitSlop;
obj[2] = hitSlop;
obj[3] = hitSlop;
tmp = obj;
}
return tmp;
};