StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
StackGenVis/frontend/node_modules/@interactjs/modifiers/snap/edges.js

56 lines
1.1 KiB

/**
* @module modifiers/snapEdges
*
* @description
* This module allows snapping of the edges of targets during resize
* interactions.
*
* @example
* interact(target).resizable({
* snapEdges: {
* targets: [interact.snappers.grid({ x: 100, y: 50 })],
* },
* })
*
* interact(target).resizable({
* snapEdges: {
* targets: [
* interact.snappers.grid({
* top: 50,
* left: 50,
* bottom: 100,
* right: 100,
* }),
* ],
* },
* })
*/
import clone from "../../utils/clone.js";
import extend from "../../utils/extend.js";
import snapSize from "./size.js";
function start(arg) {
const {
edges
} = arg;
if (!edges) {
return null;
}
arg.state.targetFields = arg.state.targetFields || [[edges.left ? 'left' : 'right', edges.top ? 'top' : 'bottom']];
return snapSize.start(arg);
}
const snapEdges = {
start,
set: snapSize.set,
defaults: extend(clone(snapSize.defaults), {
offset: {
x: 0,
y: 0
}
})
};
export default snapEdges;
//# sourceMappingURL=edges.js.map