![first position. When I try to resize(by the red point)][1]
![It is moving while dragging(change size)][2]
but When the element(ruler) is horizontal mode. it works fine.
please help me T_T
here is part of the source
ruler.css({
width: e.pageY -ruler.offset().top
});
full source is here.
$.event.add( document, "mousemove", function(e){
e.stopPropagation(e);
if(ruler_resize_active) {
console.log(".ruler-resize:mousemove");
console.log(ruler.offset().left);
console.log(ruler.offset().top);
if(options.orientation == "vertical") {
ruler.css({
width: e.pageY - ruler.offset().top
});
}
}
});
이렇게 하면 됩니다.
var ruler = $(this)
.addClass('ruler')
.css({
minWidth: options.minWidth,
maxWidth: options.maxWidth,
width: options.width,
webkitTransformOrigin: "top left"
});
'Front-end > HTML' 카테고리의 다른 글
HTML5 - Canvas Free Chart - ChartJS (0) | 2013.08.07 |
---|---|
HTML5 - HTML5 Canvas 를 활용한 다양한 라이브러리를 소개하는 사이트 (0) | 2013.05.03 |