Вверх ↑
Ответов: 211
Рейтинг: 52
#1: 2016-04-22 12:53:52 ЛС | профиль | цитата
Касательно InfoTip'а.
в element.js в теле ITElement.prototype.draw вызов "ctx.clip()" поставил следующим после вызова ctx.strokeRect
itelement1.png
но заметил и другой артефакт:
itelement2.png
т.е если надпись выходит за границы InfoTip'а она может "переползти" на ранее добавленный элемент.
Вообщем код навскидку:
ITElement.prototype.draw = function(ctx) {
ctx.save();
if(this.isSelect()) {
ctx.strokeStyle = "#000";
//ctx.lineWidth = 2;
}
else {
ctx.setLineDash([3,3]);
ctx.strokeStyle = this.sys.Color.value;
}
ctx.beginPath();//<--
ctx.rect(this.x, this.y, this.w, this.h);
ctx.strokeRect(this.x, this.y, this.w, this.h);

ctx.clip();
ctx.fillStyle = "#000";
ctx.font = "14px Arial";

//... далее без изменений
карма: 1
слтв
0
файлы: 2itelement1.png [7.8KB] [584], itelement2.png [6.5KB] [504]