FastLayer
new Konva.FastLayer(config)
FastLayer constructor. DEPRECATED! Please use Konva.Layer(\{ listening: false\}) instead. Layers are tied to their own canvas element and are used to contain shapes only. If you don't need node nesting, mouse and touch interactions, or event pub/sub, you should use FastLayer instead of Layer to create your layers. It renders about 2x faster than normal layers.
Parameters
| Name | Type | Description |
|---|---|---|
| clip (optional) | Object | set clip |
| clipX (optional) | Number | set clip x |
| clipY (optional) | Number | set clip y |
| clipWidth (optional) | Number | set clip width |
| clipHeight (optional) | Number | set clip height |
| clipFunc (optional) | function | set clip func |
Inherited from: Konva.Layer
Inherited Methods
Konva.FastLayer also has all methods of its parent classes. Each link below opens the full documentation of the method on the class that defines it.
From Konva.Layer
- getCanvas()
- getNativeCanvasElement()
- getHitCanvas()
- getContext()
- width()
- height()
- batchDraw()
- getIntersection(pos)
- enableHitGraph()
- disableHitGraph()
- toggleHitCanvas()
- imageSmoothingEnabled(imageSmoothingEnabled)
- clearBeforeDraw(clearBeforeDraw)
- hitGraphEnabled(enabled)
From Konva.Container
- getChildren(filterFunc)
- hasChildren()
- removeChildren()
- destroyChildren()
- add(children)
- find(selector)
- findOne(selector)
- isAncestorOf(node)
- getAllIntersections(pos)
- clip(clip)
- clipX(x)
- clipY(y)
- clipWidth(width)
- clipHeight(height)
- clipFunc(function)
From Konva.Node
- clearCache()
- cache(config)
- isCached()
- getClientRect(config)
- on(evtStr, handler)
- off(evtStr)
- remove()
- destroy()
- getAttr(attr)
- getAncestors()
- getAttrs()
- setAttrs(config)
- isListening()
- isVisible()
- show()
- hide()
- getAbsoluteZIndex()
- getDepth()
- getRelativePointerPosition()
- getAbsolutePosition(top)
- move(change)
- rotate(theta)
- moveToTop()
- moveUp()
- moveDown()
- moveToBottom()
- getAbsoluteOpacity()
- moveTo(newContainer)
- toObject()
- toJSON()
- getParent()
- findAncestors(selector, includeSelf, stopNode)
- findAncestor(selector, includeSelf, stopNode)
- getLayer()
- getStage()
- fire(eventType, evt, bubble)
- getAbsoluteTransform()
- getAbsoluteScale()
- getAbsoluteRotation()
- getTransform()
- clone(obj)
- toCanvas(config)
- toDataURL(config)
- toImage(config)
- toBlob(config)
- getClassName()
- getType()
- addName(name)
- hasName(name)
- removeName(name)
- setAttr(attr, val)
- draw()
- startDrag()
- stopDrag()
- isDragging()
- isClientRectOnScreen(margin)
- zIndex(index)
- absolutePosition(pos)
- position(pos)
- x(x)
- y(y)
- globalCompositeOperation(type)
- opacity(opacity)
- name(name)
- id(id)
- rotation(rotation)
- scale(scale)
- scaleX(x)
- scaleY(y)
- skew(skew)
- skewX(x)
- skewY(y)
- offsetX(x)
- offsetY(y)
- dragDistance(distance)
- listening(listening)
- preventDefault(preventDefault)
- filters(filters)
- visible(visible)
- transformsEnabled(enabled)
- size(size)
- dragBoundFunc(dragBoundFunc)
- draggable(draggable)
- to(params)
- blurRadius(radius)
- brightness(brightness)
- contrast(contrast)
- embossStrength(level)
- embossWhiteLevel(embossWhiteLevel)
- embossDirection(embossDirection)
- embossBlend(embossBlend)
- enhance(amount)
- hue(hue)
- saturation(saturation)
- luminance(value)
- value(value)
- kaleidoscopePower(power)
- kaleidoscopeAngle(degrees)
- noise(noise)
- pixelSize(pixelSize)
- levels(level)
- red(red)
- green(green)
- blue(blue)
- alpha(alpha)
- threshold(threshold)