Fixed issue with config for ruler

This commit is contained in:
Erik Tiekstra
2017-05-16 12:53:23 +02:00
parent c0f1180199
commit 9803376e20
4 changed files with 13 additions and 5 deletions
@@ -37,7 +37,14 @@ function RulerHandler(viewport) {
0, 0,
axis === 'h' ? bounds.width : 0,
axis === 'v' ? bounds.height : 0
], config.rulerHandle.line(axis, bounds));
], {
evented: false,
strokeDashArray: [5, 5],
stroke: '#000',
strokeWidth: 1,
top: axis === 'h' ? bounds.top + bounds.height / 2 : bounds.top,
left: axis === 'v' ? bounds.left + bounds.width / 2 : bounds.left
});
}
/**
+2 -2
View File
@@ -14,8 +14,8 @@ function TextButton(text, settings) {
var _rect = null;
var _text = null;
var _rectSettings = config.textButton.rect(settings.width, settings.height);
var _textSettings = $.extend({}, config.textButton.text, {
var _rectSettings = $.extend({}, config.textButton.rect(settings.width, settings.height));
var _textSettings = $.extend({}, config.textButton.text, settings, {
text: Array.isArray(text) ? text[0] : text,
textActive: Array.isArray(text) ? text[1] : text,
});
+2 -1
View File
@@ -14,9 +14,10 @@ module.exports = {
},
text: {
fontSize: 12,
width: 75,
height: 20,
color: '#33ff33',
fill: '#33ff33',
},
h: function(lines, bounds) {
+1 -1
View File
@@ -13,7 +13,7 @@
var imageUrl = '//images.photowall.com/products/' + $input.image_id.val() + '.jpg?h=450';
var editor = new ImageEditor('canvas-editor', {'type': 'canvas'})
var editor = new ImageEditor('canvas-editor', {'type': 'wallpaper'})
.loadImage(imageUrl, function() {
$input.w.trigger('input');
});