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() {
var check = new kity.Path()
.getDrawer()
.moveTo(-3, 0)
.lineTo(-1, 3)
.lineTo(3, -2)
.moveTo(-3, -1)
.lineTo(-1, 2)
.lineTo(3, -3)
.getPath()
.stroke('white', 2)
.setVisible(false);
this.addShapes([circle, pie, check]);
......
......@@ -72,10 +72,7 @@ var ViewDragger = kity.createClass("ViewDragger", {
if (isTempDrag) {
dragger.setEnabled(false);
isTempDrag = false;
var me = this;
setTimeout(function () {
me.rollbackStatus();
});
this.rollbackStatus();
}
});
}
......
......@@ -5,6 +5,14 @@ KityMinder.registerModule('Zoom', function() {
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) {
var paper = minder.getPaper();
var viewport = paper.getViewPort();
......@@ -17,10 +25,11 @@ KityMinder.registerModule('Zoom', function() {
setter: function(target, value) {
viewport.zoom = value;
viewport.center = {
x: viewport.center.x | 0 + 0.5,
y: viewport.center.y | 0 + 0.5
x: viewport.center.x,
y: viewport.center.y
};
target.setViewPort(viewport);
fixPaperCTM();
}
});
minder.zoom = zoom;
......@@ -28,7 +37,7 @@ KityMinder.registerModule('Zoom', function() {
timeline.pause();
}
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