Untitled conversation
- User
let action_flag; if (x < x0) { return; } else if (x <= x1) { action_flag = 0; } else if (x <= x2) { action_flag = 1; } else if (x <= x3) { action_flag = 2; } else if (x <= x4) { action_flag = 4; } else if (x <= x5) { action_flag = 8; } else if (x <= x6) { action_flag = 16; } else if (x <= x7) { action_flag = 32; } else { return; } if (y < y0) { return; } else if (y <= y1) { action_flag |= 64; } else if (y <= y2) { action_flag |= 128; } else if (y <= y3) { action_flag |= 256; } else if (y <= y4) { action_flag |= 512; } else if (y <= y5) { action_flag |= 1024; } else if (y <= y6) { action_flag |= 2048; } else if (y <= y7) { action_flag |= 4096; } else { return; }complete this flag constants
const ACTION_FLAGS = { RESIZE_NW: 0, RESIZE_NE: 0, RESIZE_SW: 0, RESIZE_SE: 0, RESIZE_N: 0, RESIZE_S: 0, RESIZE_W: 0, RESIZE_E: 0, MOVE: 0 }based on the table:
// action x-range y-range // resize-nw: (x0, x3) (y0, y3) // resize-ne: (x4, x7) (y0, y3) // resize-sw: (x0, x3) (y4, y7) // resize-se: (x4, x7) (y4, y7) // resize-n: (x1, x6), (y1, y2) // resize-s: (x1, x6), (y5, y6) // resize-w: (x1, x2), (y1, y6) // resize-e: (x5, x6), (y1, y6) // move: (x2, x5), (y2, y5) - Assistant