403Webshell
Server IP : 27.254.152.13  /  Your IP : 216.73.217.38
Web Server : Apache/2
System : Linux ns1-252017.dragonhispeed.com 5.2.0 #1 SMP Fri Mar 29 22:50:14 MSK 2024 x86_64
User : coloflew ( 1072)
PHP Version : 5.6.40
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coloflew/public_html/cdn/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/coloflew/public_html/cdn/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Measure.js
/**
 * Measure.js
 *
 * Released under LGPL License.
 * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
 *
 * License: http://www.tinymce.com/license
 * Contributing: http://www.tinymce.com/contributing
 */

define('tinymce/inlite/core/Measure', [
	'global!tinymce.DOM',
	'global!tinymce.geom.Rect',
	'tinymce/inlite/core/Convert'
], function (DOM, Rect, Convert) {
	var toAbsolute = function (rect) {
		var vp = DOM.getViewPort();

		return {
			x: rect.x + vp.x,
			y: rect.y + vp.y,
			w: rect.w,
			h: rect.h
		};
	};

	var getElementRect = function (editor, elm) {
		var pos, targetRect, root;

		pos = DOM.getPos(editor.getContentAreaContainer());
		targetRect = editor.dom.getRect(elm);
		root = editor.dom.getRoot();

		// Adjust targetPos for scrolling in the editor
		if (root.nodeName == 'BODY') {
			targetRect.x -= root.ownerDocument.documentElement.scrollLeft || root.scrollLeft;
			targetRect.y -= root.ownerDocument.documentElement.scrollTop || root.scrollTop;
		}

		targetRect.x += pos.x;
		targetRect.y += pos.y;

		// We need to use these instead of the rect values since the style
		// size properites might not be the same as the real size for a table
		targetRect.w = elm.clientWidth > 0 ? elm.clientWidth : elm.offsetWidth;
		targetRect.h = elm.clientHeight > 0 ? elm.clientHeight : elm.offsetHeight;

		return targetRect;
	};

	var getPageAreaRect = function (editor) {
		return DOM.getRect(editor.getElement().ownerDocument.body);
	};

	var getContentAreaRect = function (editor) {
		return toAbsolute(DOM.getRect(editor.getContentAreaContainer() || editor.getBody()));
	};

	var getSelectionRect = function (editor) {
		var clientRect = editor.selection.getBoundingClientRect();
		return clientRect ? toAbsolute(Convert.fromClientRect(clientRect)) : null;
	};

	return {
		getElementRect: getElementRect,
		getPageAreaRect: getPageAreaRect,
		getContentAreaRect: getContentAreaRect,
		getSelectionRect: getSelectionRect
	};
});

Youez - 2016 - github.com/yon3zu
LinuXploit