top

CAPH.WUI.ENGINE.RENDERING.CSSOBJECT

CssObject is a DOM object which is rendered in CSSRenderer.


Constructor

CssObject

Description
The constructor of CSSObject, in order to create CSSObject object.
Parameters
dom DocumentElementA DocumentElement to embed
Emulator SupportY
SDK ConstraintNone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);

Methods

addEvent

Description
caph.wui.engine.rendering.CssObject 'addEvent' method used to add event of DOM Element. This method takes type and listener as arguments.
Parameters
■eventName
  - String
  - type of event It can be of following types: 'click', 'touch', 'release','drag','dragstart','dragend', 'swipe', 'swipeleft', 'swiperight', 'swipeup','swipedown','pinch','transformstart','transform','transformend'    
  - listener : listener attach
■handler
  - Function
  - callback function
■options (Optional)
  - Object
  - optional options - deprecated
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.addEvent('click', eventFn);
obj.removeEvent('click', eventFn);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

function eventFn() {
    obj.setXPosition(obj.getXPosition()+10);
}

removeEvent

Description
caph.wui.engine.rendering.CSSObject 'removeEvent' method allows you to remove event of CSSObject. This method takes type and listener as arguments.
Parameters
■eventName
  - String
  - type of event It can be of following types : 'click', 'touch', 'release','drag','dragstart','dragend', 'swipe', 'swipeleft', 'swiperight', 'swipeup','swipedown','pinch','transformstart','transform','transformend'    
■handler
  - Function
  - callback function
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.addEvent('click', eventFn);
obj.removeEvent('click', eventFn);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

function eventFn() {
    obj.setXPosition(obj.getXPosition()+10);
}

applyMatrix

Description
caph.wui.engine.rendering.CssObject 'applyMatrix' method allows you multiply 4x4 matrix to the CSSObject Object. This method takes 16 matrix values as arguments.
Parameters
■m1, m2, m3,..., m16
  - Number
  - 4x4 matrix values
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.applyMatrix(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,300,0,1);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

getPosition

Description
caph.wui.engine.rendering.CssObject 'getRotation' method return rotation object with x, y, z values of DOM Element.
Parameters
■Void
Return■Object
  - Object
  - x : x value, y : y value, z : z value
  - Object of x coordinate, y coordinate, z coordinate values
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.getPosition();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

getYPosition

Description
caph.wui.engine.rendering.CssObject 'getRotation' method return rotation object with x, y, z values of DOM Element.
Parameters
■Void
Return■Number
  - integer
  - object's position y value
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.getYPosition();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

hide

Description
caph.wui.engine.rendering.CssObject 'hide' method used to hide CSSObject.
Parameters
■Void
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.hide();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

show

Description
caph.wui.engine.rendering.CssObject 'show' method allows you to make the CSSObject visible.
Parameters
■Void
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.hide();
obj.show();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setOpacity

Description
caph.wui.engine.rendering.CssObject 'setOpacity' method used to set the opacity of CSSObject. This method takes opacity value as an argument.
Parameters
■value
  - Number
  - Required opacity value
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setOpacity(0.5);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setPosition

Description
caph.wui.engine.rendering.CssObject 'setPosition' method used to change X,Y,Z position of CSSObject . This method takes an x,y,z as an argument.
Parameters
■x
  - Number
  - The coordinates of the required x position.
■y
  - Number
  - The coordinates of the required y position.
■z
  - Number
  - The coordinates of the required z position.
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setPosition(100, 100, 100);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

getXPosition

Description
caph.wui.engine.rendering.CssObject 'getXPosition' method allows you to get X position value of DOM Element.
Parameters
■Void
Return■Number
  - The coordinate in pixels
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setPosition(100, 100, 100);
obj.getXPosition();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

getZPosition

Description
caph.wui.engine.rendering.CssObject 'getZPosition' method allows you to get Z position value of DOM Element.
Parameters
■Void
Return■Number
  - The coordinate in pixels
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setPosition(100, 100, 100);
obj.getZPosition();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setRotation

Description
caph.wui.engine.rendering.CssObject 'setRotation' method used to set rotation around X, Y and Z axis . This method takes an x,y,z as an argument.
Parameters
■x
  - Number
  - The coordinates of the required  x rotation
■y
  - Number
  - The coordinates of the required  y rotation
■z
  - Number
  - The coordinates of the required  z rotation
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setRotation(0.1, 0.1, 0);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

getRotation

Description
caph.wui.engine.rendering.CssObject 'getRotation' method return rotation object with x, y, z values of DOM Element.
Parameters
■Void
Return■Object
  - Object
  - x : x value, y : y value, z : z value
  - Object of x coordinate, y coordinate, z coordinate values
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setRotation(0.1, 0.1, 0);
obj.getRotation();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

getXRotation

Description
caph.wui.engine.rendering.CssObject 'getXRotation' method return X rotation value of DOM Element.
Parameters
■Void
Return■Number
  - The rotation value
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setRotation(0.1, 0.1, 0);
obj.getXRotation();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

getYRotation

Description
caph.wui.engine.rendering.CssObject 'getYRotation' method return Y rotation value of DOM Element.
Parameters
■Void
Return■Number
  - The rotation value
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setRotation(0.1, 0.1, 0);
obj.getYRotation();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

getZRotation

Description
caph.wui.engine.rendering.CssObject 'getZRotation' method return Z rotation value of DOM Element.
Parameters
■Void
Return■Number
  - The rotation value
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setRotation(0.1, 0.1, 0);
obj.getZRotation();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setRotationOrigin

Description
caph.wui.engine.rendering.CssObject 'setRotationOrigin' method used to set rotation origin of CSSObject, rotated around X, Y and Z axis with given degrees respectively. This method takes an x,y,z,degX,degY,degZ as argument.
Parameters
■x
  - Number
  - The coordinates of the required  x rotation
■y
  - Number
  - The coordinates of the required  y rotation
■z
  - Number
  - The coordinates of the required  z rotation
Return■Number
  - -1 : fails
  - undefined : otherwise.
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setRotationOrigin(300, 300, 0, 0.1, 0.1, 0.1);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setScale

Description
caph.wui.engine.rendering.CssObject 'setScale' method used to scale CSSObject along x, y,z direction. This method takes x,y,z as argument.
Parameters
■x
  - Number
  - x values required scale
■y
  - Number
  - y values required scale
■z
  - Number
  - z values required scale
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setScale(1.5, 1.5, 1.5);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

getScale

Description
caph.wui.engine.rendering.CssObject 'getScale' method returns scale object with x, y ,z scale values of DOM Element.
Parameters
■Void
Return■Object
  - Object
  - x : x value, y : y value, z : z value
  - Object of x rotation, y rotation, z rotation values
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setScale(2, 2, 2);
obj.getScale();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

getXScale

Description
caph.wui.engine.rendering.CssObject 'getXScale' method returns scale x value of DOM Element.
Parameters
■Void
Return■Number
  - integer
  - object's scale x value
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setScale(2, 2, 2);
obj.getXScale();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

getYScale

Description
caph.wui.engine.rendering.CssObject 'getYScale' method returns scale y value of DOM Element.
Parameters
■Void
Return■Number
  - integer
  - object's scale y value
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setScale(2, 2, 2);
obj.getYScale();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

getZScale

Description
caph.wui.engine.rendering.CssObject 'getYScale' method returns scale y value of DOM Element.
Parameters
■Void
Return■Number
  - object's rotation z value
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setScale(2, 2, 2);
obj.getZScale();

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setXPosition

Description
caph.wui.engine.rendering.CssObject 'setXPosition' method used to change X position of CSSObject . This method takes an x as an argument.
Parameters
■x
  - Number
  - The coordinates of the required x position.
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setXPosition(100);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setXRotation

Description
caph.wui.engine.rendering.CssObject 'setRotation' method used to set rotation around X, Y and Z axis . This method takes an x,y,z as an argument.
Parameters
■x
  - Number
  - The coordinates of the required  x rotation
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setXRotation(0.1);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setXRotationOrigin

Description
caph.wui.engine.rendering.CssObject 'setXRotationOrigin' method used to set rotation origin of CSSObject around X axis to a given degree from origin point x, y, z. This method takes an x,y,z,deg as argument.
Parameters
■x
  - Number
  - The coordinates of the required  x rotation
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setXRotationOrigin(300, 300, 0, 0.1);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setXScale

Description
caph.wui.engine.rendering.CssObject 'setYScale' method used to scale CSSObject along y direction. This method takes y scale value as arguments
Parameters
■x
  - Number
  - x values required scale
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setXScale(1.5);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setYPosition

Description
caph.wui.engine.rendering.CssObject 'setYRotation' method used to change rotation of CSSObject around y axis. This method takes an y coordinate as an argument.
Parameters
■y
  - Number
  - The coordinates of the required y position.
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setYPosition(100);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setYRotation

Description
caph.wui.engine.rendering.CssObject 'setRotation' method used to set rotation around X, Y and Z axis . This method takes an x,y,z as an argument.
Parameters
■y
  - Number
  - The coordinates of the required y rotation
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setYRotation(0.1);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setYRotationOrigin

Description
caph.wui.engine.rendering.CssObject 'setXRotationOrigin' method used to set rotation origin of CSSObject around Y axis to a given degree from origin point x, y, z. This method takes an x,y,z,deg as argument.
Parameters
■y
  - Number
  - The coordinates of the required y rotation
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setYRotationOrigin(300, 300, 0, 0.1);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setYScale

Description
caph.wui.engine.rendering.CssObject 'setYScale' method used to scale CSSObject along y direction. This method takes y scale value as arguments
Parameters
■y
  - Number
  - y values required scale
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setYScale(1.5);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setZPosition

Description
caph.wui.engine.rendering.CssObject 'getRotation' method return rotation object with x, y, z values of DOM Element.
Parameters
■z
  - Number
  - The coordinates of the required z position.
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setZPosition(100);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setZRotation

Description
caph.wui.engine.rendering.CssObject 'setRotation' method used to set rotation around X, Y and Z axis . This method takes an x,y,z as an argument.
Parameters
■z
  - Number
  - The coordinates of the required z rotation
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setZRotation(0.1);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setZRotationOrigin

Description
caph.wui.engine.rendering.CssObject 'setZRotationOrigin' method used to set rotation origin of CSSObject around Z axis to a given degree from origin point x, y, z. This method takes an x,y,z,deg as argument.
Parameters
■z
  - Number
  - The coordinates of the required z rotation
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setZRotationOrigin(300, 300, 0, 0.1);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setZScale

Description
caph.wui.engine.rendering.CssObject 'setZScale' method used to scale CSSObject along z direction. This method takes z scale value as arguments
Parameters
■z
  - Number
  - z values required scale
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

obj.setZScale(1.5);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

addPreSibling

Description
caph.wui.engine.rendering.CssObject 'addPreSibling' method used to add the sibling before the DOM Element. This method takes an object which to be added as sibling as an arguments.
Parameters
■object
  - Object
  - sibling obj
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

var element2 = document.createElement('div');
element2.style.width = '100px';
element2.style.height = '100px';
element2.style.background = '#00AAAA';

var obj2 = new AccRendering.CssObject(element2);

obj.addPreSibling(obj2);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

appendChild

Description
caph.wui.engine.rendering.CSSObject 'appendChild' method allows you to append an object as a child element to CSSObject. This method takes child object as an argument.
Parameters
■object
  - Object  
  - The child object to be appended.
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

var element2 = document.createElement('div');
element2.style.width = '100px';
element2.style.height = '100px';
element2.style.background = '#00AAAA';

var obj2 = new AccRendering.CssObject(element2);

obj.appendChild(obj2);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

addNextSibling

Description
add the next sibling
Parameters
■obj 
 - Object
  - Object to link
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

var element2 = document.createElement('div');
element2.style.width = '100px';
element2.style.height = '100px';
element2.style.background = '#00AAAA';

var obj2 = new AccRendering.CssObject(element2);
basePage.add(obj2);

obj.hide();
obj.show();
obj2.hide();
obj2.show();
obj.addNextSibling(obj2);

CssObject

Description
(Constructor) The constructor of CSSObject, in order to create CSSObject object.
Parameters
■dom
  - DocumentElement
  - A DocumentElement to embed
Return■Object
  - Object
  - An instance of CssObject
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);