Commit cc241e11 authored by campaign's avatar campaign

Merge remote-tracking branch 'origin/dev' into dev

parents d58cf2e5 7458951d
...@@ -30,10 +30,11 @@ KityMinder.registerModule('ProgressModule', function() { ...@@ -30,10 +30,11 @@ KityMinder.registerModule('ProgressModule', function() {
var check = new kity.Path() var check = new kity.Path()
.getDrawer() .getDrawer()
.moveTo(-3, 0) .moveTo(-3, -1)
.lineTo(-1, 3) .lineTo(-1, 2)
.lineTo(3, -2) .lineTo(3, -3)
.getPath() .getPath()
.stroke('white', 2)
.setVisible(false); .setVisible(false);
this.addShapes([circle, pie, check]); this.addShapes([circle, pie, check]);
......
...@@ -72,10 +72,7 @@ var ViewDragger = kity.createClass("ViewDragger", { ...@@ -72,10 +72,7 @@ var ViewDragger = kity.createClass("ViewDragger", {
if (isTempDrag) { if (isTempDrag) {
dragger.setEnabled(false); dragger.setEnabled(false);
isTempDrag = false; isTempDrag = false;
var me = this; this.rollbackStatus();
setTimeout(function () {
me.rollbackStatus();
});
} }
}); });
} }
......
...@@ -5,6 +5,14 @@ KityMinder.registerModule('Zoom', function() { ...@@ -5,6 +5,14 @@ KityMinder.registerModule('Zoom', function() {
me.setDefaultOptions('zoom', [50, 80, 100, 120, 150, 200]); me.setDefaultOptions('zoom', [50, 80, 100, 120, 150, 200]);
function fixPaperCTM() {
var paper = me.getPaper();
var node = paper.shapeNode;
var ctm = node.getCTM();
var matrix = new kity.Matrix(ctm.a, ctm.b, ctm.c, ctm.d, (ctm.e | 0) + 0.5, (ctm.f | 0) + 0.5);
node.setAttribute('transform', 'matrix(' + matrix.toString() + ')');
}
function zoomMinder(minder, zoom) { function zoomMinder(minder, zoom) {
var paper = minder.getPaper(); var paper = minder.getPaper();
var viewport = paper.getViewPort(); var viewport = paper.getViewPort();
...@@ -17,10 +25,11 @@ KityMinder.registerModule('Zoom', function() { ...@@ -17,10 +25,11 @@ KityMinder.registerModule('Zoom', function() {
setter: function(target, value) { setter: function(target, value) {
viewport.zoom = value; viewport.zoom = value;
viewport.center = { viewport.center = {
x: viewport.center.x | 0 + 0.5, x: viewport.center.x,
y: viewport.center.y | 0 + 0.5 y: viewport.center.y
}; };
target.setViewPort(viewport); target.setViewPort(viewport);
fixPaperCTM();
} }
}); });
minder.zoom = zoom; minder.zoom = zoom;
...@@ -28,7 +37,7 @@ KityMinder.registerModule('Zoom', function() { ...@@ -28,7 +37,7 @@ KityMinder.registerModule('Zoom', function() {
timeline.pause(); timeline.pause();
} }
timeline = animator.start(paper, 500, 'ease', function() { timeline = animator.start(paper, 500, 'ease', function() {
minder.refresh(300); minder.refresh(500);
}); });
} }
......
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