Closed cyulin closed 7 years ago
@wxa1048989080 Hey, Thanks for the feedback.
Seems to be bugs introduced recently, Ill look into them. Also the documentation needs a brush up.
@wxa1048989080 Ive fixed the issues mentioned and also the demo page.
If you can please verify and can close this issue. thanks.
@MrFrankel Excellent! I install the ruler package of version 1.0, after testing,the first problem has bend fixed, but the second question still exists.
I think this section code should changed: Source line 104
var constructGuide = function(dimension, x, y, e, isSet) {
var guideIndex;
//.....
if (dimension === VERTICAL) {
guide.style.left = ruler.prototype.utils.pixelize(x - options.container.getBoundingClientRect().left);
if (isSet) guide.style.left = ruler.prototype.utils.pixelize( Math.round( x / CUR_SCALE ) + options.rulerHeight );
} else {
guide.style.top = ruler.prototype.utils.pixelize(y - options.container.getBoundingClientRect().top);
if (isSet) guide.style.top = ruler.prototype.utils.pixelize( Math.round( y / CUR_SCALE ) + options.rulerHeight );
}
//......
};
@wxa1048989080 Not quit sure what you mean.
If I do:
var guides = myRuler.getGuides();
myRuler.clearGuides();
myRuler.setGuides(guides);
The guides are applied to the ruler.
Maybe if you can supply a gist reproducing the issue.
Got it?
@wxa1048989080 Yea! got it! Best bug report ever!
You want to put in a pull request for the fix?
fixed in #7
very nice tool ! Thank you MrFrankel ! This is what I need, but I find Some can be improved.