Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5991827
ve.ce.MWResizableNode.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ve.ce.MWResizableNode.js
View Options
/*!
* VisualEditor ContentEditable MWResizableNode class.
*
* @copyright See AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* ContentEditable MediaWiki resizable node.
*
* @class
* @abstract
* @extends ve.ce.ResizableNode
*
* @constructor
* @param {jQuery} [$resizable=this.$element] Resizable DOM element
* @param {Object} [config] Configuration options
*/
ve
.
ce
.
MWResizableNode
=
function
VeCeMWResizableNode
(
$resizable
,
config
)
{
ve
.
ce
.
ResizableNode
.
call
(
this
,
$resizable
,
config
);
};
/* Inheritance */
OO
.
inheritClass
(
ve
.
ce
.
MWResizableNode
,
ve
.
ce
.
ResizableNode
);
/**
* Generate an object of attributes changes from the new width and height.
*
* If either property changes, clear the defaultSize flag.
*
* @param {number} width New image width
* @param {number} height New image height
* @return {Object} Attribute changes
*/
ve
.
ce
.
MWResizableNode
.
prototype
.
getAttributeChanges
=
function
(
width
,
height
)
{
const
attrChanges
=
ve
.
ce
.
ResizableNode
.
prototype
.
getAttributeChanges
.
call
(
this
,
width
,
height
);
if
(
!
ve
.
isEmptyObject
(
attrChanges
)
)
{
attrChanges
.
defaultSize
=
false
;
}
// type=frame is not resizeable, so change it to type=thumb
if
(
this
.
getModel
().
getAttribute
(
'type'
)
===
'frame'
)
{
attrChanges
.
type
=
'thumb'
;
}
return
attrChanges
;
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 4 2026, 02:02 (4 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e6/f6/4a97acffd3dcabf699ddb3e1db9b
Default Alt Text
ve.ce.MWResizableNode.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment