selectees.each(function() {
var $this = $(this),
pos = $this.offset(); <--- here!!
$.data(this, "selectable-item", {
element: this,
$element: $this,
left: pos.left,
top: pos.top,
right: pos.left + $this.outerWidth(),
bottom: pos.top + $this.outerHeight(),
startselected: false,
selected: $this.hasClass("ui-selected"),
selecting: $this.hasClass("ui-selecting"),
unselecting: $this.hasClass("ui-unselecting")
});
});
I'm making a image editor.
I was using CSS conversion transform scale.
$this.outerWidth() is the return value of the width of the original.
However, getBoundingClientRect method is the return for the value of the adaptive width scale.
So, getBoundingClientRect because I think that's offset () catechism accurate, I want to know the reason not to use getBoundingClientRect.