| <?xml version="1.0" encoding="UTF-8" ?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| --> |
| <library> |
| |
| <class name="drawViewInner" extends="drawview" x="0" y="0" > |
| |
| </class> |
| |
| <!-- |
| this is the Base Container for all Whiteboard Objects |
| --> |
| <class name="drawViewNew" extends="drawview" cachebitmap="false" x="0" y="0" > |
| |
| <attribute name="typeOfObject" value="paint" type="string" /> |
| |
| <attribute name="initwidth" value="0" type="number" /> |
| <attribute name="initheight" value="0" type="number" /> |
| |
| <event name="prepareForDelete" /> |
| |
| <handler name="oninit"> |
| this.initwidth=this.width; |
| this.initheight=this.height; |
| </handler> |
| |
| <handler name="onwidth"> |
| <![CDATA[ |
| if (this.isinited) { |
| if(this.name.indexOf('line')>=0 |
| || this.name.indexOf('uline')>=0 |
| || this.name.indexOf('drawarrow')>=0 |
| || this.name.indexOf('paint')>=0) { |
| this.getDisplayObject()._xscale = (this.width/this.initwidth)*100; |
| } else if (this.name.indexOf('rectangle')>=0) { |
| parent.redrawRectItemByScaling(this); |
| } else if (this.name.indexOf('ellipse')>=0) { |
| parent.redrawEllipseItemByScaling(this); |
| } |
| } |
| ]]> |
| </handler> |
| |
| <handler name="onheight"> |
| <![CDATA[ |
| if (this.isinited) { |
| if(this.name.indexOf('line')>=0 |
| || this.name.indexOf('uline')>=0 |
| || this.name.indexOf('drawarrow')>=0 |
| || this.name.indexOf('paint')>=0) { |
| this.getDisplayObject()._yscale = (this.height/this.initheight)*100; |
| } else if (this.name.indexOf('rectangle')>=0) { |
| parent.redrawRectItemByScaling(this); |
| } else if (this.name.indexOf('ellipse')>=0) { |
| parent.redrawEllipseItemByScaling(this); |
| } |
| } |
| ]]> |
| </handler> |
| <!-- |
| <dragstate name="dragger" drag_axis="both" |
| drag_min_x="0" |
| drag_max_x="$once{parent.width - this.width}" |
| drag_min_y="0" |
| drag_max_y="$once{parent.height - this.height}"> |
| </dragstate> |
| --> |
| </class> |
| |
| </library> |