Commit b5cbafb8 authored by techird's avatar techird

ui update

parent 49035271
...@@ -32,6 +32,7 @@ $dependency = Array( ...@@ -32,6 +32,7 @@ $dependency = Array(
,'src/module/editor.cursor.js' ,'src/module/editor.cursor.js'
,'src/module/basestyle.js' ,'src/module/basestyle.js'
,'src/module/font.js' ,'src/module/font.js'
,'src/module/zoom.js'
,'src/ui/widget.js' ,'src/ui/widget.js'
,'src/ui/button.js' ,'src/ui/button.js'
,'src/ui/toolbar.js' ,'src/ui/toolbar.js'
......
Subproject commit 2fc98bc18520a511cbf9010cf7fe78e5e5dde255 Subproject commit 9491171cf3bf6195d841934779b6e5e565319341
...@@ -13,7 +13,7 @@ kity.extendClass( Minder, { ...@@ -13,7 +13,7 @@ kity.extendClass( Minder, {
}, },
// TODO: mousemove lazy bind // TODO: mousemove lazy bind
_bindPaperEvents: function () { _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 ) { if ( window ) {
window.addEventListener( 'resize', this._firePharse.bind( this ) ); window.addEventListener( 'resize', this._firePharse.bind( this ) );
} }
......
...@@ -30,12 +30,8 @@ KityMinder.registerModule( "MouseModule", function () { ...@@ -30,12 +30,8 @@ KityMinder.registerModule( "MouseModule", function () {
selectStart: function ( e ) { selectStart: function ( e ) {
if ( e.originEvent.button ) return; if ( e.originEvent.button ) return;
if ( startPos ) return this.selectEnd(); if ( startPos ) return this.selectEnd();
minder.getRenderContainer().addShape( selectRect ); minder._paper.addShape( selectRect );
var p = e.getPosition(); startPos = e.getPosition();
startPos = {
x: p.x,
y: p.y
};
selectRect.setOpacity( 0.8 ).getDrawer().clear(); selectRect.setOpacity( 0.8 ).getDrawer().clear();
}, },
selectMove: function ( e ) { 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 @@ ...@@ -2,7 +2,7 @@
.kmui-btn-toolbar .kmui-btn{ .kmui-btn-toolbar .kmui-btn{
position: relative; position: relative;
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: middle;
*display: inline; *display: inline;
*zoom:1; *zoom:1;
width:auto; width:auto;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
background-position: -60px 0; background-position: -60px 0;
} }
.kmui-btn-toolbar .kmui-btn .kmui-icon-font, .kmui-btn-toolbar .kmui-btn .kmui-icon-forecolor { .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 { .kmui-btn-toolbar .kmui-btn .kmui-icon-hand {
background: url(../images/hand.png) no-repeat 2px 2px; background: url(../images/hand.png) no-repeat 2px 2px;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
.kmui-combobox .kmui-button-label{ .kmui-combobox .kmui-button-label{
position: relative; position: relative;
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: middle;
*display: inline ; *display: inline ;
*zoom:1; *zoom:1;
width:60px; width:60px;
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
.kmui-combobox .kmui-button-spacing{ .kmui-combobox .kmui-button-spacing{
position: relative; position: relative;
display: inline-block ; display: inline-block ;
vertical-align: top; vertical-align: middle;
*display: inline ; *display: inline ;
*zoom:1; *zoom:1;
height:20px; height:20px;
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
.kmui-combobox .kmui-caret{ .kmui-combobox .kmui-caret{
position: relative; position: relative;
display: inline-block ; display: inline-block ;
vertical-align: top; vertical-align: middle;
*display: inline ; *display: inline ;
*zoom:1; *zoom:1;
height:20px; height:20px;
......
.kmui-combobox-menu{ .kmui-combobox-menu{
position: absolute; position: absolute;
top: 100%; top: 100%;
left: 0; left: 2px;
display: none; display: none;
list-style: none; list-style: none;
text-decoration: none; text-decoration: none;
margin: 0; margin: 0;
padding:5px; padding:5px;
background-color: #ffffff; background-color: #ffffff;
border: 1px solid #ccc;
font-size: 12px; font-size: 12px;
box-shadow: 2px 2px 5px #d3d6da; box-shadow: 2px 2px 5px rgba(0, 0, 0, .5);
min-width: 160px; min-width: 160px;
_width: 160px; _width: 160px;
-webkit-transform: translateX(2px);
font-family: Arial;
} }
.kmui-combobox-menu .kmui-combobox-item { .kmui-combobox-menu .kmui-combobox-item {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
background: url(../images/icons.png) -179px 1px; background: url(../images/icons.png) -179px 1px;
background: url(../images/icons.gif) -179px 1px \9; background: url(../images/icons.gif) -179px 1px \9;
display: inline-block ; display: inline-block ;
vertical-align: top; vertical-align: middle;
*display: inline ; *display: inline ;
*zoom:1; *zoom:1;
border:none; border:none;
......
.kmui-btn-toolbar .kmui-splitbutton{ .kmui-btn-toolbar .kmui-splitbutton{
position: relative; position: relative;
display: inline-block ; display: inline-block ;
vertical-align: top; vertical-align: middle;
*display: inline ; *display: inline ;
*zoom:1; *zoom:1;
margin:0 2px; margin:0 2px;
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
.kmui-splitbutton .kmui-caret{ .kmui-splitbutton .kmui-caret{
position: relative; position: relative;
display: inline-block ; display: inline-block ;
vertical-align: top; vertical-align: middle;
*display: inline ; *display: inline ;
*zoom:1; *zoom:1;
width: 8px; 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