mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 06:31:15 +08:00
Increase default anchor size for Konva.Transformer
on touch devices. fix #814
This commit is contained in:
parent
fbebc3fad2
commit
00c5ccc4bb
@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
* Make events work on some CSS transforms
|
||||
* Fix caching on float dimensions
|
||||
* Fix `mouseleave` event on stage.
|
||||
* Increase default anchor size for `Konva.Transformer` on touch devices
|
||||
|
||||
## 4.0.18 - 2019-11-20
|
||||
|
||||
|
6
konva.js
6
konva.js
@ -8,7 +8,7 @@
|
||||
* Konva JavaScript Framework v4.0.18
|
||||
* http://konvajs.org/
|
||||
* Licensed under the MIT
|
||||
* Date: Wed Dec 18 2019
|
||||
* Date: Mon Dec 23 2019
|
||||
*
|
||||
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
||||
* Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva)
|
||||
@ -14567,6 +14567,7 @@
|
||||
'bottom-center': 180,
|
||||
'bottom-right': 135
|
||||
};
|
||||
var TOUCH_DEVICE = 'ontouchstart' in Konva._global;
|
||||
function getCursor(anchorName, rad, isMirrored) {
|
||||
if (anchorName === 'rotater') {
|
||||
return 'crosshair';
|
||||
@ -14808,7 +14809,8 @@
|
||||
strokeWidth: 1,
|
||||
name: name + ' _anchor',
|
||||
dragDistance: 0,
|
||||
draggable: true
|
||||
draggable: true,
|
||||
hitStrokeWidth: TOUCH_DEVICE ? 10 : 'auto'
|
||||
});
|
||||
var self = this;
|
||||
anchor.on('mousedown touchstart', function (e) {
|
||||
|
4
konva.min.js
vendored
4
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@ -52,7 +52,7 @@ export interface ShapeConfig extends NodeConfig {
|
||||
fillPriority?: string;
|
||||
stroke?: string;
|
||||
strokeWidth?: number;
|
||||
hitStrokeWidth?: number;
|
||||
hitStrokeWidth?: number | string;
|
||||
strokeScaleEnabled?: boolean;
|
||||
strokeHitEnabled?: boolean;
|
||||
strokeEnabled?: boolean;
|
||||
|
@ -85,6 +85,8 @@ var ANGLES = {
|
||||
'bottom-right': 135
|
||||
};
|
||||
|
||||
const TOUCH_DEVICE = 'ontouchstart' in Konva._global;
|
||||
|
||||
function getCursor(anchorName, rad, isMirrored) {
|
||||
if (anchorName === 'rotater') {
|
||||
return 'crosshair';
|
||||
@ -339,7 +341,8 @@ export class Transformer extends Group {
|
||||
strokeWidth: 1,
|
||||
name: name + ' _anchor',
|
||||
dragDistance: 0,
|
||||
draggable: true
|
||||
draggable: true,
|
||||
hitStrokeWidth: TOUCH_DEVICE ? 10 : 'auto'
|
||||
});
|
||||
var self = this;
|
||||
anchor.on('mousedown touchstart', function(e) {
|
||||
|
Loading…
Reference in New Issue
Block a user