Class: HistoryLayer

HistoryLayer()

new HistoryLayer()

Implements:

Extends

Members

(readonly) canvas

Properties:
Name Type Description
canvas Canvas
Inherited From:

(readonly) ctx

Properties:
Name Type Description
ctx CanvasRenderingContext2D
Inherited From:

(constant) initializer :string

The name of constructor the class, will be used to restore the object. The constructor has to be accessable via
window[initializer]
Type:
  • string
Inherited From:
Implements:

needRedraw

Properties:
Type Description
boolean
Inherited From:

partialDraw

Properties:
Type Description
boolean
Inherited From:

rect

Properties:
Type Description
Rect
Inherited From:

Methods

addButton(button)

Parameters:
Name Type Description
button Button
Inherited From:
Parameters:
Name Type Description
link Link
Inherited From:

addRoutineButton(button)

Parameters:
Name Type Description
button RoutineButton
Inherited From:

canDrawPartial() → {boolean}

Can it draw only a certain part? If yes, drawContext will be called with rect, and drawable should draw only in that rect. Drawing less = better performance.
Inherited From:
Returns:
Type
boolean

children() → {Array.<Drawable>}

Drawable to be draw in the layer
Overrides:
Returns:
Type
Array.<Drawable>

childrenAtContentOffset()

offsetでcellからchildrenを作る childrenの高さが足りなければ上に寄せる。 PageBreakを無視する。

draw(drawable)

Parameters:
Name Type Description
drawable Drawable The drawable to redraw, it has to be one of the children.
Inherited From:

drawOnContext(context, rect)

Draw on this context. If canDrawPartial is true, this can be called with rect. When it is called with rect, drawable should only draw in the specificed area.
Parameters:
Name Type Description
context CanvasRenderingContext2D
rect Rect In the context's coordinate.
Overrides:

flush() → {boolean}

Overrides:
Returns:
trueならredrawしています、falseならしていない
Type
boolean

frame() → {Rect}

Return the frame, which is the actually area this drawable draws on (including things like shadow). Subclass should override if needed.
Inherited From:
Returns:
Type
Rect

getCorrespondingLayer() → {Layer}

Get the fore / back corresponding layer
Inherited From:
Returns:
Type
Layer

hide(direction, backgroundStay)

Parameters:
Name Type Description
direction "left" | "right" | "up" | "down" Animation direction
backgroundStay boolean

measureText(texts) → {TextMetrics}

このメッセージレイヤで文字を書いたら、どのくらいのサイズになるのかを計算します 改行は計算しません。 stringが渡されたら今のメッセージレイヤのスタイルで計算します TextPropertiesだと、そのobjectの設定で計算します
Parameters:
Name Type Description
texts Array.<string> | Array.<TextProperties>
Inherited From:
Returns:
Type
TextMetrics

mousedown() → {boolean}

Return true if this layer handled the event, otherwise the event will passed to the next layer.
Inherited From:
Returns:
Type
boolean

mousemove() → {boolean}

Return true if this layer handled the event, otherwise the event will passed to the next layer.
Overrides:
Returns:
Type
boolean

mouseup() → {boolean}

Return true if this layer handled the event, otherwise the event will passed to the next layer.
Overrides:
Returns:
Type
boolean

objectToBeSerialized(key) → {object|Serializable}

Return an object to be serialized for a specific key.
Parameters:
Name Type Description
key string The key of property to be serialized
Overrides:
Implements:
Returns:
- An object or serializable to be saved for the specific key, return undefined = not to be saved.
Type
object | Serializable

redrawRect(rect)

Parameters:
Name Type Description
rect Rect Redraw a rect within the layer
Inherited From:

resetCursor()

Reset cursor location according to margin and rect.
Inherited From:

resetMessageLayer()

Reset message Layer
Inherited From:

setRect(rect)

Parameters:
Name Type Description
rect Rect
Inherited From:

show(direction, backgroundStay)

Parameters:
Name Type Description
direction "left" | "right" | "up" | "down" Animation direction
backgroundStay boolean

showGlyphLayer(glyphLayer, mode)

Parameters:
Name Type Description
glyphLayer GlyphLayer
mode string "line" or "page"
Inherited From: