Commit b5cbafb8 authored by techird's avatar techird

ui update

parent 49035271
......@@ -32,6 +32,7 @@ $dependency = Array(
,'src/module/editor.cursor.js'
,'src/module/basestyle.js'
,'src/module/font.js'
,'src/module/zoom.js'
,'src/ui/widget.js'
,'src/ui/button.js'
,'src/ui/toolbar.js'
......
Subproject commit 2fc98bc18520a511cbf9010cf7fe78e5e5dde255
Subproject commit 9491171cf3bf6195d841934779b6e5e565319341
......@@ -13,7 +13,7 @@ kity.extendClass( Minder, {
},
// TODO: mousemove lazy bind
_bindPaperEvents: function () {
this._paper.on( 'click mousedown mouseup mousemove touchstart touchmove touchend', this._firePharse.bind( this ) );
this._paper.on( 'click mousedown mouseup mousemove mousewheel touchstart touchmove touchend', this._firePharse.bind( this ) );
if ( window ) {
window.addEventListener( 'resize', this._firePharse.bind( this ) );
}
......
......@@ -30,12 +30,8 @@ KityMinder.registerModule( "MouseModule", function () {
selectStart: function ( e ) {
if ( e.originEvent.button ) return;
if ( startPos ) return this.selectEnd();
minder.getRenderContainer().addShape( selectRect );
var p = e.getPosition();
startPos = {
x: p.x,
y: p.y
};
minder._paper.addShape( selectRect );
startPos = e.getPosition();
selectRect.setOpacity( 0.8 ).getDrawer().clear();
},
selectMove: function ( e ) {
......
KityMinder.registerModule( 'Zoom', function () {
return {
events: {
'mousewheel': function ( e ) {
var viewport = this._paper.getViewPort();
if ( e.originEvent.wheelDelta > 0 ) {
viewport.zoom = viewport.zoom * 0.95;
} else {
viewport.zoom = viewport.zoom / 0.95;
}
//this._paper.setViewPort( viewport );
}
}
};
} );
\ No newline at end of file
......@@ -2,7 +2,7 @@
.kmui-btn-toolbar .kmui-btn{
position: relative;
display: inline-block;
vertical-align: top;
vertical-align: middle;
*display: inline;
*zoom:1;
width:auto;
......
......@@ -12,7 +12,7 @@
background-position: -60px 0;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-font, .kmui-btn-toolbar .kmui-btn .kmui-icon-forecolor {
background-position: -720px 0;
background-position: -720px 1px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-hand {
background: url(../images/hand.png) no-repeat 2px 2px;
......
......@@ -7,7 +7,7 @@
.kmui-combobox .kmui-button-label{
position: relative;
display: inline-block;
vertical-align: top;
vertical-align: middle;
*display: inline ;
*zoom:1;
width:60px;
......@@ -22,7 +22,7 @@
.kmui-combobox .kmui-button-spacing{
position: relative;
display: inline-block ;
vertical-align: top;
vertical-align: middle;
*display: inline ;
*zoom:1;
height:20px;
......@@ -32,7 +32,7 @@
.kmui-combobox .kmui-caret{
position: relative;
display: inline-block ;
vertical-align: top;
vertical-align: middle;
*display: inline ;
*zoom:1;
height:20px;
......
.kmui-combobox-menu{
position: absolute;
top: 100%;
left: 0;
left: 2px;
display: none;
list-style: none;
text-decoration: none;
margin: 0;
padding:5px;
background-color: #ffffff;
border: 1px solid #ccc;
font-size: 12px;
box-shadow: 2px 2px 5px #d3d6da;
box-shadow: 2px 2px 5px rgba(0, 0, 0, .5);
min-width: 160px;
_width: 160px;
-webkit-transform: translateX(2px);
font-family: Arial;
}
.kmui-combobox-menu .kmui-combobox-item {
......
......@@ -5,7 +5,7 @@
background: url(../images/icons.png) -179px 1px;
background: url(../images/icons.gif) -179px 1px \9;
display: inline-block ;
vertical-align: top;
vertical-align: middle;
*display: inline ;
*zoom:1;
border:none;
......
.kmui-btn-toolbar .kmui-splitbutton{
position: relative;
display: inline-block ;
vertical-align: top;
vertical-align: middle;
*display: inline ;
*zoom:1;
margin:0 2px;
......@@ -12,7 +12,7 @@
.kmui-splitbutton .kmui-caret{
position: relative;
display: inline-block ;
vertical-align: top;
vertical-align: middle;
*display: inline ;
*zoom:1;
width: 8px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment