Когда я настраиваю текст как ссылку, устанавливаю границу границ и устанавливаю область попадания в форму границ, моя область попадания отключена, если textAlign = 'center'. Есть идеи?В createjs textAlign Center Причинение смещения области удалений
var linkColor = "#0000ff";
var linkFont = "bold 14px Times";
var presentationLink = new createjs.Text("View Presentation", linkFont, linkColor);
presentationLink.textAlign = "left";
presentationLink.maxWidth = 170;
presentationLink.x = 300;
presentationLink.y = 125;
stage.addChild(presentationLink);
var plBounds = presentationLink.getTransformedBounds();
var s = new createjs.Shape().set({ x: plBounds.x, y: plBounds.y + plBounds.height });
s.graphics.s(linkColor).moveTo(0, 0).lineTo(plBounds.width, 0);
stage.addChild(s);
var hitAreaForPLink = new createjs.Shape(new createjs.Graphics().beginFill("#ffffff").drawRect(-10, -10, plBounds.width + 20, plBounds.height + 10));
presentationLink.hitArea = hitAreaForPLink;
stage.enableMouseOver();
presentationLink.on("mouseover", function() {
presentationLink.cursor = "pointer";
});
Как в стороне, вам не нужно указывать курсор на мыши. Это именно то, что делает 'cursor' (установить курсор, который будет применяться при наведении курсора мыши). – gskinner