JavaScript 拖拉缩放效果
2010-09-14 13:27:46 来源:WEB开发网//缩放程序
//上
Up:function(e){
this.RepairY(this._sideDown-e.clientY,this._mxUpHeight);
this.RepairTop();
this.TurnDown(this.Down);
},
//下
Down:function(e){
this.RepairY(e.clientY-this._sideUp,this._mxDownHeight);
this.TurnUp(this.Up);
},
//右
Right:function(e){
this.RepairX(e.clientX-this._sideLeft,this._mxRightWidth);
this.TurnLeft(this.Left);
},
//左
Left:function(e){
this.RepairX(this._sideRight-e.clientX,this._mxLeftWidth);
this.RepairLeft();
this.TurnRight(this.Right);
},
//右下
RightDown:function(e){
this.RepairAngle(
e.clientX-this._sideLeft,this._mxRightWidth,
e.clientY-this._sideUp,this._mxDownHeight
);
this.TurnLeft(this.LeftDown)||this.TurnUp(this.RightUp);
},
//右上
RightUp:function(e){
this.RepairAngle(
e.clientX-this._sideLeft,this._mxRightWidth,
this._sideDown-e.clientY,this._mxUpHeight
);
this.RepairTop();
this.TurnLeft(this.LeftUp)||this.TurnDown(this.RightDown);
},
//左下
LeftDown:function(e){
this.RepairAngle(
this._sideRight-e.clientX,this._mxLeftWidth,
e.clientY-this._sideUp,this._mxDownHeight
);
this.RepairLeft();
this.TurnRight(this.RightDown)||this.TurnUp(this.LeftUp);
},
//左上
LeftUp:function(e){
this.RepairAngle(
this._sideRight-e.clientX,this._mxLeftWidth,
this._sideDown-e.clientY,this._mxUpHeight
);
this.RepairTop();this.RepairLeft();
this.TurnRight(this.RightUp)||this.TurnDown(this.LeftDown);
},
Tags:JavaScript 拖拉 缩放
编辑录入:爽爽 [复制链接] [打 印]更多精彩
赞助商链接