<commit_before>/**
 * Modified version of the resize plugin to support touch events.
 *
 * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.md or http://ckeditor.com/license
 */

CKEDITOR.plugins.add( 'cmsresize', {
    init: function( editor ) {
        function dragHandler( evt ) {
			console.log(evt, origin);
            var dx = evt.originalEvent.screenX - origin.x,
            dy = evt.originalEvent.screenY - origin.y,
            width = startSize.width,
            height = startSize.height,
            internalWidth = width + dx * ( resizeDir == 'rtl' ? -1 : 1 ),
            internalHeight = height + dy;

            if ( resizeHorizontal )
                width = Math.max( config.resize_minWidth, Math.min( internalWidth, config.resize_maxWidth ) );

            if ( resizeVertical )
                height = Math.max( config.resize_minHeight, Math.min( internalHeight, config.resize_maxHeight ) );

            // DO NOT impose fixed size with single direction resize. (#6308)<commit_msg>console.log<commit_after>/**
 * Modified version of the resize plugin to support touch events.
 *
 * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.md or http://ckeditor.com/license
 */

CKEDITOR.plugins.add( 'cmsresize', {
    init: function( editor ) {
        function dragHandler( evt ) {
            var dx = evt.originalEvent.screenX - origin.x,
            dy = evt.originalEvent.screenY - origin.y,
            width = startSize.width,
            height = startSize.height,
            internalWidth = width + dx * ( resizeDir == 'rtl' ? -1 : 1 ),
            internalHeight = height + dy;

            if ( resizeHorizontal )
                width = Math.max( config.resize_minWidth, Math.min( internalWidth, config.resize_maxWidth ) );

            if ( resizeVertical )
                height = Math.max( config.resize_minHeight, Math.min( internalHeight, config.resize_maxHeight ) );

            // DO NOT impose fixed size with single direction resize. (#6308)
{'fraction_non_alphanumeric': 0.1067548417572036, 'fraction_numerical': 0.013226263580538498, 'mean_word_length': 2.309375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6652287', 'n_tokens_mistral': 619, 'n_tokens_neox': 568, 'n_words': 165}