Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7417530
ve.ce.InlineImageNode.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.InlineImageNode.js
View Options
/*!
* VisualEditor ContentEditable InlineImageNode class.
*
* @copyright See AUTHORS.txt
*/
/**
* ContentEditable inline image node.
*
* @class
* @extends ve.ce.LeafNode
* @mixes ve.ce.ImageNode
* @mixes ve.ce.ResizableNode
*
* @constructor
* @param {ve.dm.InlineImageNode} model Model to observe
* @param {Object} [config] Configuration options
*/
ve
.
ce
.
InlineImageNode
=
function
VeCeInlineImageNode
(
model
,
config
=
{}
)
{
config
=
ve
.
extendObject
(
{
minDimensions
:
{
width
:
1
,
height
:
1
}
},
config
);
// Parent constructor
ve
.
ce
.
InlineImageNode
.
super
.
call
(
this
,
model
,
config
);
// Mixin constructors
ve
.
ce
.
ImageNode
.
call
(
this
,
this
.
$element
,
null
,
config
);
// Initialization
this
.
$element
.
addClass
(
've-ce-inlineImageNode'
)
.
prop
(
{
alt
:
this
.
model
.
getAttribute
(
'alt'
),
src
:
this
.
getResolvedAttribute
(
'src'
)
}
)
.
css
(
{
width
:
this
.
model
.
getAttribute
(
'width'
),
height
:
this
.
model
.
getAttribute
(
'height'
)
}
);
};
/* Inheritance */
OO
.
inheritClass
(
ve
.
ce
.
InlineImageNode
,
ve
.
ce
.
LeafNode
);
OO
.
mixinClass
(
ve
.
ce
.
InlineImageNode
,
ve
.
ce
.
ImageNode
);
/* Static Properties */
ve
.
ce
.
InlineImageNode
.
static
.
name
=
'inlineImage'
;
ve
.
ce
.
InlineImageNode
.
static
.
tagName
=
'img'
;
/* Registration */
ve
.
ce
.
nodeFactory
.
register
(
ve
.
ce
.
InlineImageNode
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 22, 03:21 (1 d, 9 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b9/4d/65935a4030cfbe63efb5736536ed
Default Alt Text
ve.ce.InlineImageNode.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment