Adds a sublayer, element, jSignage object or an array of them to the selected layer.
Details
.add( sublayer )
The sublayer begin time can be relative to the begin of the parent layer or to the time of the call. The active interval of the parent restricts the active interval of every sublayer.
Returns jSignage layer object
$('svg').add([
$.image({ href: 'images/1.jpg', id: 'back' }),
$.video({ href: 'video/1.avi', id: 'media1', width: '50%', height: '50%', top: '25%', left: '25%' })
]);
Related .addTo()
SpinetiX wiki source / Guide
Adds the selected layer to a parent, a jSignage object or an element.
Details
.addTo( parent )
sublayer.addTo(parent) is the same as parent.add(sublayer).
Returns jSignage layer object
$.textArea({ fontSize: 60 }).text('Hello').addTo('svg');
Related .add()
SpinetiX wiki source / Guide
.animateColor()
# method jSignage In content Animates the color of a gradient stop or of a shape's fill or stroke.
Details
.animateColor( attributesObject ) | .animateColor( target, attributesObject )
Accepts the timing attributes (begin, dur, fill, repeatCount, repeatDur) and the value attributes (accumulate, additive, by, calcMode, from, keySplines, keyTimes, to, values). Color values are interpolated in RGB space.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Animation timing and value attributes. |
target | Number | String | | Index of the gradient stop to animate, or the color attribute name for a shape, e.g. 'fill' or 'stroke'. Optional. |
Returns jSignage Object
$.rect({ x: 0, y: 0, width: 1280, height: 720, fill: 'blue' }).animateColor( 'fill', { begin: 5, dur: 10, from: 'blue', to: 'red', repeatCount: 'indefinite' }).addTo('svg');
Related .animateOpacity(), $.svgAnimation(), values
SpinetiX wiki source / Guide
.animateMotion()
# method jSignage In content Moves a layer along a path given as coordinates or a $.pathData object.
Details
.animateMotion( attributesObject )
Takes the timing and value attributes plus keyPoints, path and rotate. values, from, to and by take x,y coordinate pairs; calcMode defaults to 'paced' (constant velocity).
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Timing, value, keyPoints, path and rotate attributes. |
Returns jSignage Object
$.media({ href: 'image.jpeg', left: 0, top: 100, width: 80, height: 100 }).animateMotion({ begin: '0', dur: 10, from: '0,0', to: '1200,0', fill: 'freeze' }).addTo('svg');
Notes Supported on SpinetiX products, but probably does not work in most browsers. On a shape it works only when the shape sits inside a jSignage layer, e.g. $.g().add( $.circle( params ) ).
Related $.svgAnimation(), values, path, keyPoints, rotate
SpinetiX wiki source / Guide
.animateOpacity()
# method jSignage In content Animates the opacity of a layer, a shape color or a gradient stop.
Details
.animateOpacity( attributesObject ) | .animateOpacity( target, attributesObject )
values, from, to and by take opacity values between 0 and 1.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Animation timing and value attributes. |
target | Number | String | | Index of the gradient stop, or the color attribute name for a shape, e.g. 'fill' or 'stroke'. Optional. |
Returns jSignage Object
$.rect({ x: 0, y: 0, width: 1280, height: 720 }).animateOpacity( 'fill', { dur: 10, from: 0, to: 1, repeatCount: 'indefinite' }).addTo('svg');
Related .animateColor(), $.svgAnimation(), values
SpinetiX wiki source / Guide
.animateRotate()
# method jSignage In content Rotates a layer; values, from, to and by are angles in degrees.
Details
.animateRotate( attributesObject )
Takes the timing attributes and the value attributes (accumulate, additive, by, calcMode, from, keySplines, keyTimes, to, values).
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Animation timing and value attributes. |
Returns jSignage Object
$.media({ href: 'media/logo.png' }).animateRotate({ from: 0, to: 360, dur: 10 }).addTo('svg');
Since Firmware 3.1.0
Related values
SpinetiX wiki source / Guide
.animateZoom()
# method jSignage In content Zooms a layer; from, to and values are zoom factors.
Details
.animateZoom( attributesObject )
Takes the timing attributes and from, to and values only.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Animation timing attributes plus from, to, values. |
Returns jSignage Object
$.media({ href: 'media/logo.png' }).animateZoom({ from: 0.5, to: 1, dur: 10 }).addTo('svg');
Notes For firmware before 3.1.0 use the zoom effects (.zoomIn(), .zoomOut()) instead.
Since Release 3.1.0
Related .zoomIn(), .zoomOut(), values
SpinetiX wiki source / Guide
Elliptical arc to (x, y) from radii, x-axis rotation, and the large-arc and sweep flags.
Details
.arcTo( rx, ry, rotation, largeArc, sweep, x, y )
SpinetiX wiki source / Guide
.audioFadeIn()
# method jSignage In content Fades the audio level from 0 (mute) to 1.
Details
.audioFadeIn( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
Returns jSignage Object
$('#myVideo').audioFadeIn({ dur: '2s' });
SpinetiX wiki source / Guide
.audioFadeOut()
# method jSignage In content Fades the audio level from 1 to 0 (mute).
Details
.audioFadeOut( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
Returns jSignage Object
$('#myVideo').audioFadeOut({ dur: '2s' });
SpinetiX wiki source / Guide
Starts or resumes auto mode.
Details
.auto( timePerItem )
timePerItem is optional and sets the time spent on each item.
SpinetiX wiki source / Guide
Starts the layer now or after a delay in seconds.
Details
.begin() | .begin( beginTime )
Triggers an installed in-effect. If the layer is already active it restarts without triggering out-effects. For interactive layers, set the begin attribute to 'indefinite' so the layer waits for this call.
Returns jSignage layer object
$.video({ href: 'video.avi', begin: 'indefinite' }).addTo('svg').begin();
SpinetiX wiki source / Guide
Installs a handler that is called when the layer begins.
Details
.beginEvent( handler )
Returns jSignage layer object
$('#movie1').beginEvent(function(){ /* layer started */ });
SpinetiX wiki source / Guide
.blink()
# method jSignage In content Hides the layer briefly, once or repeatedly, to draw attention.
Details
.blink( [attributesObject] )
Not an entry effect, so offset is usually above 0. The layer is hidden at offset, offset+repeatInterval, offset+2*repeatInterval and so on. repeatCount can be 'indefinite'. When repeatDur is null or undefined, repeatCount controls the repeats.
| Parameter | Type | Default | Description |
dur | Number | String | 0.5s | Time the layer is hidden. |
offset | Number | String | 0s | Start time of the effect. |
repeatInterval | Number | String | 1s | Interval between repeats. |
repeatCount | Number | String | 1 | Number of blinks. |
repeatDur | Number | String | | How long to repeat the effect. |
Returns jSignage Object
$('#myImage').blink({ offset: 2, repeatCount: 3 });
SpinetiX wiki source / Guide
.click()
# event jSignage In content Handles a click on a layer.
Details
jSignageLayer.click( callback )
All layer types.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
$('svg').click( function() { $.info('clicked'); });
SpinetiX wiki source / Guide
Draws a straight line to the start of the current subpath and ends it.
Details
.cubeFaceIn()
# method jSignage In content Pseudo-3D cube face rotation bringing the layer in.
Details
.cubeFaceIn( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
direction | String | 'random' | 'random', 'rightToLeft', 'leftToRight', 'bottomToTop' or 'topToBottom'. |
Returns jSignage Object
$('#myVideo').cubeFaceIn({ direction: 'leftToRight' });
SpinetiX wiki source / Guide
.cubeFaceOut()
# method jSignage In content Pseudo-3D cube face rotation taking the layer out.
Details
.cubeFaceOut( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
direction | String | 'random' | 'random', 'rightToLeft', 'leftToRight', 'bottomToTop' or 'topToBottom'. |
Returns jSignage Object
$('#myVideo').cubeFaceOut({ direction: 'rightToLeft' });
SpinetiX wiki source / Guide
Cubic Bezier curve to (x, y) with control points (x1, y1) at the start and (x2, y2) at the end.
Details
.curveTo( x1, y1, x2, y2, x, y )
SpinetiX wiki source / Guide
.DOMActivate()
# event jSignage In content Handles activation of a layer.
Details
jSignageLayer.DOMActivate( callback )
Focus-sensitive layers.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
Notes The wiki lists this handler by name only; its event fields come from SVG Tiny 1.2 uDOM.
Related .click()
SpinetiX wiki source / Guide
.DOMFocusIn()
# event jSignage In content Handles a layer gaining focus.
Details
jSignageLayer.DOMFocusIn( callback )
Focus-sensitive layers.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
Notes The wiki lists this handler by name only; its event fields come from SVG Tiny 1.2 uDOM.
Related .click()
SpinetiX wiki source / Guide
.DOMFocusOut()
# event jSignage In content Handles a layer losing focus.
Details
jSignageLayer.DOMFocusOut( callback )
Focus-sensitive layers.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
Notes The wiki lists this handler by name only; its event fields come from SVG Tiny 1.2 uDOM.
Related .click()
SpinetiX wiki source / Guide
.effectIn()
# method jSignage In content Helper to write a custom in effect: wraps the layer in a g element and calls your callback.
Details
.effectIn( callback )
The callback may be deferred until the layer is in the rendering tree. this is the wrapping g element. The callback must not change attributes of this or inner; it adds SVG animation elements under this instead. Extend jSignage.fn with the new method and return this.
| Parameter | Type | Default | Description |
callback | Function | | callback( trigger, inner, width, height, left, top, bbw, bbh ). trigger is the begin trigger of the media; inner is the next element in the effect stack; width/height is the layer size; left/top its position in the parent; bbw/bbh the parent size, all in pixels. |
Returns jSignage Object
$.fn.audioFadeIn = function( args ) {
var dur = jSignage.durInSeconds( args && args.dur, 1 );
return this.effectIn( function( trigger ) {
jSignage.svgAnimation( this, 'animate', { attributeName: 'audio-level', from: '0', to: '1', begin: trigger, dur: dur });
});
};
Related .effectOut(), $.durInSeconds(), $.svgAnimation()
SpinetiX wiki source / Guide
.effectOut()
# method jSignage In content Helper to write a custom out effect: wraps the layer in a g element and calls your callback.
Details
.effectOut( dur, callback )
Same wrapping and callback as effectIn, but trigger marks the end of the media.
| Parameter | Type | Default | Description |
dur | Number | | Duration of the effect in seconds. |
callback | Function | | callback( trigger, inner, width, height, left, top, bbw, bbh ). |
Returns jSignage Object
$.fn.audioFadeOut = function( args ) {
var dur = jSignage.durInSeconds( args && args.dur, 1 );
return this.effectOut( dur, function( trigger ) {
jSignage.svgAnimation( this, 'animate', { attributeName: 'audio-level', from: '1', to: '0', begin: trigger, dur: dur });
});
};
Related .effectIn(), $.durInSeconds()
SpinetiX wiki source / Guide
Ends the layer now or after a delay in seconds.
Details
.end() | .end( endTime )
Without a parameter out-effects are not applied. To let them run, pass an endTime equal to the duration of the out-effect.
Returns jSignage layer object
$('#movie1').end();
SpinetiX wiki source / Guide
Installs a handler that is called when the layer ends.
Details
.endEvent( handler )
The handler is not called if .removeAfter() is set, because its callback is called instead, or if repeatDur is 'indefinite'.
Returns jSignage layer object
$('#my_media').endEvent(function(){
$('#my_animation').end();
});
SpinetiX wiki source / Guide
Ends the layer when another jSignage object ends, optionally after an offset.
Details
.endsWith( jSignageObject ) | .endsWith( jSignageObject, offsetTime )
Usually used to end an indefinite parent such as a group when a child such as a video ends. This lets an out-effect run or a slideshow move to the next slide.
Returns jSignage layer object
var video = $.media({ href: 'video/1.avi' });
$.g().add([video]).endsWith(video).addTo('svg');
SpinetiX wiki source / Guide
.fadeIn()
# method jSignage In content Fades the layer in from the background.
Details
.fadeIn( [attributesObject] )
In effect, runs when the layer appears.
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
Returns jSignage Object
$('image').fadeIn({ dur: '1s' });
SpinetiX wiki source / Guide
.fadeOut()
# method jSignage In content Fades the layer out to the background.
Details
.fadeOut( [attributesObject] )
Out effect, runs when the layer disappears.
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
Returns jSignage Object
$('#myImage').fadeOut({ dur: '1s' });
SpinetiX wiki source / Guide
.flyIn()
# method jSignage In content Flies the layer in from just outside its parent layer.
Details
.flyIn( [attributesObject] )
When the parent is the top-level svg, the start is outside the screen.
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
direction | String | 'random' | 'random', 'rightToLeft', 'leftToRight', 'bottomToTop' or 'topToBottom'. |
acceleration | Number | 3 | Ratio from initial to final speed. |
Returns jSignage Object
$('#myImage').flyIn({ dur: '1s', direction: 'leftToRight' });
SpinetiX wiki source / Guide
.flyOut()
# method jSignage In content Flies the layer out to just outside its parent layer.
Details
.flyOut( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
direction | String | 'random' | 'random', 'rightToLeft', 'leftToRight', 'bottomToTop' or 'topToBottom'. |
acceleration | Number | 3 | Ratio from initial to final speed. |
Returns jSignage Object
$('#myImage').flyOut({ dur: '1s', direction: 'rightToLeft', acceleration: 1 });
SpinetiX wiki source / Guide
Formats a date with the DateTimeFormat object.
Details
f.format( date )
| Parameter | Type | Default | Description |
date | Date | | Date to format. |
Returns String
var f = new $.DateTimeFormat( 'dd/MM/yyyy' );
var str = f.format( new Date() ); // "24/04/2013"
Notes The wiki shows this method only in the examples, not in a reference section.
SpinetiX wiki source / Guide
Formats a number with the NumberFormat object.
Details
f.format( number )
| Parameter | Type | Default | Description |
number | Number | | Number to format. |
Returns String
var f = new $.NumberFormat( $.NumberFormat.Format.DECIMAL );
var str = f.format( Math.PI ); // "3.142"
Notes The wiki shows this method only in the examples, not in a reference section.
SpinetiX wiki source / Guide
Makes the layer invisible after applying out-effects, same as .end(longestOutEffectDuration).
Details
.hide()
No effect if the layer is already hidden.
Returns jSignage layer object
$('#back').hide();
Related .show()
SpinetiX wiki source / Guide
.hover()
# event jSignage In content Handles pointer hover over a layer.
Details
jSignageLayer.hover( callback )
All layer types.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
Notes The wiki lists this handler by name only; its event fields come from SVG Tiny 1.2 uDOM.
Related .click()
SpinetiX wiki source / Guide
.keydown()
# event jSignage In content Handles a key press; gives the key identifier and modifier flags.
Details
jSignageLayer.keydown( callback )
Focus-sensitive layers, or on $('svg'). event.keyIdentifier holds the key as U+ code (U+0041 for 'A'); modifier flags such as shiftKey are set. Does not give the resulting character; use textInput for that.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
$('svg').keydown( function( event ) {
if ( event.keyIdentifier == 'U+0050' ) media.pause();
});
Notes For a layer that includes an svg file with this code, set the layer's 'focusable' attribute to true (Elementi: Layer Properties, Advanced tab).
Related .click()
SpinetiX wiki source / Guide
.keyup()
# event jSignage In content Handles a key release; gives the key identifier and modifier flags.
Details
jSignageLayer.keyup( callback )
Focus-sensitive layers, or on $('svg'). Same event object as keydown.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
Notes For a layer that includes an svg file with this code, set the layer's 'focusable' attribute to true (Elementi: Layer Properties, Advanced tab).
Related .click()
SpinetiX wiki source / Guide
Draws a straight line from the current point to a new point.
Details
.mousedown()
# event jSignage In content Handles mouse button press.
Details
jSignageLayer.mousedown( callback )
All layer types. evt.button is 0 for left, 1 middle, 2 right; evt.clientX and evt.clientY give the position.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
$('svg').mousedown( function( evt ) { $.info( evt.button ); });
Related .click()
SpinetiX wiki source / Guide
.mouseenter()
# event jSignage In content Handles the pointer entering a layer.
Details
jSignageLayer.mouseenter( callback )
All layer types.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
Notes The wiki lists this handler by name only; its event fields come from SVG Tiny 1.2 uDOM.
Related .click()
SpinetiX wiki source / Guide
.mouseleave()
# event jSignage In content Handles the pointer leaving a layer.
Details
jSignageLayer.mouseleave( callback )
All layer types.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
Notes The wiki lists this handler by name only; its event fields come from SVG Tiny 1.2 uDOM.
Related .click()
SpinetiX wiki source / Guide
.mousemove()
# event jSignage In content Handles pointer movement over a layer.
Details
jSignageLayer.mousemove( callback )
All layer types.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
$('svg').mousemove( function( evt ) { $.info( evt.clientX ); });
Related .click()
SpinetiX wiki source / Guide
.mouseout()
# event jSignage In content Handles the pointer leaving a layer.
Details
jSignageLayer.mouseout( callback )
All layer types.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
$('#box').mouseout( function() { $(this).attr('fill','green'); });
Related .click()
SpinetiX wiki source / Guide
.mouseover()
# event jSignage In content Handles the pointer moving over a layer.
Details
jSignageLayer.mouseover( callback )
All layer types.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
$('#box').mouseover( function() { $(this).attr('fill','red'); });
Related .click()
SpinetiX wiki source / Guide
.mouseup()
# event jSignage In content Handles mouse button release.
Details
jSignageLayer.mouseup( callback )
All layer types.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
$('svg').mouseup( function() { $.info('up'); });
Related .click()
SpinetiX wiki source / Guide
.mousewheel()
# event jSignage In content Handles the mouse wheel over a layer.
Details
jSignageLayer.mousewheel( callback )
All layer types.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
Notes The wiki lists this handler by name only; its event fields come from SVG Tiny 1.2 uDOM.
Related .click()
SpinetiX wiki source / Guide
Starts a new current point.
Details
Navigates to the next choice.
Details
.nudge()
# method jSignage In content Moves or scales the layer around its rest position to draw attention.
Details
.nudge( [attributesObject] )
nudgeX and nudgeY set motion, nudgeZ sets zoom. Motion is pixels or a percentage string such as '10%' of the layer size. At least one of the three must be set, there are no defaults that apply. Not an entry effect, so offset is usually above 0. repeatCount can be 'indefinite'.
| Parameter | Type | Default | Description |
offset | Number | String | 0s | Start time of the effect. |
dur | Number | String | 0.5s | Duration of the effect. |
nudgeX | Number | String | 0 | Maximum horizontal motion; positive to the right, negative to the left. |
nudgeY | Number | String | 0 | Maximum vertical motion; positive down, negative up. |
nudgeZ | String | '0%' | Maximum zoom in percent; positive zooms in, negative shrinks. |
repeatInterval | Number | String | 1s | Interval between repeats. |
repeatCount | Number | String | 1 | Number of repeats. |
repeatDur | Number | String | | How long to repeat the effect. |
Returns jSignage Object
$('#myImage').nudge({ offset: 2, repeatCount: 3, nudgeX: '-10%' });
SpinetiX wiki source / Guide
.pageIn()
# method jSignage In content Fades in and zooms in quickly from the background.
Details
.pageIn( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
Returns jSignage Object
$('svg').add( $.video({ href: 'video/1.avi', id: '#myVideo' }).pageIn() );
SpinetiX wiki source / Guide
.pageOut()
# method jSignage In content Fades out and zooms out quickly to the background.
Details
.pageOut( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
Returns jSignage Object
$('#myVideo').pageOut();
SpinetiX wiki source / Guide
Pauses a media layer.
Details
.pause()
No effect on static layers or on advanced layers such as playlist and slideshow.
$('#movie1').pause();
Related .resume()
SpinetiX wiki source / Guide
.pivotIn()
# method jSignage In content Pivots the layer in around a horizontal or vertical line through its center.
Details
.pivotIn( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
orientation | String | 'random' | 'random', 'horizontal' or 'vertical'. |
Returns jSignage Object
$('#myVideo').pivotIn({ orientation: 'horizontal' });
SpinetiX wiki source / Guide
.pivotOut()
# method jSignage In content Pivots the layer out around a horizontal or vertical line through its center.
Details
.pivotOut( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
orientation | String | 'random' | 'random', 'horizontal' or 'vertical'. |
Returns jSignage Object
$('#myVideo').pivotOut({ orientation: 'vertical' });
SpinetiX wiki source / Guide
Navigates to the previous choice.
Details
Appends items to the data array of a playlist, slideshow, crawler, text ticker, media crawler or text bar.
Details
.pushData( value1, value2, ..., valueN )
Each argument is one element or an array of elements. If the layer is active, the items are appended to an internal copy of the data and lengthen the run. If it has ended or not yet started, it restarts and earlier data is lost. A layer showing nothing turns on, as with .show().
Returns jSignage Object
var pl = $.playlist({ repeatCount: 'indefinite' }).addTo('svg');
pl.pushData('new-1.jpg', 'new-2.jpg');
Related $.playlist(), $.slideshow(), $.crawler(), $.textTicker(), $.mediaCrawler(), $.textBar()
SpinetiX wiki source / Guide
Quadratic Bezier curve to (x, y) with control point (x1, y1).
Details
.quadTo( x1, y1, x, y )
SpinetiX wiki source / Guide
.ready()
# method jSignage In content Runs a handler once all elements of the SVG document are loaded.
Details
jSignage( document ).ready( handler_function ) | $( handler_function )
An SVG document cannot be manipulated safely before it is ready. Elementi wraps all jSignage code in an anonymous function passed to $().
$(function(){
$.media({ href: 'smile.jpg' }).addTo('svg');
});
Related jSignage() / $()
SpinetiX wiki source / Guide
Removes the layer from the DOM after it ends, optionally after a delay and with a callback.
Details
.removeAfter() | .removeAfter( timeAfterEnd ) | .removeAfter( timeAfterEnd, callback )
Recommended after .end() or .hide() on dynamically added layers to avoid memory leaks. It stops the handler set with .endEvent() from being called; use .removeAfter(0, handler) instead. Combine with .setFillFreeze() to keep a frozen layer visible for timeAfterEnd seconds.
Returns jSignage layer object
$.textArea({ dur: 5 }).text('Hello').removeAfter().addTo('svg');
SpinetiX wiki source / Guide
Resumes a paused media layer.
Details
.resume()
No effect on static layers or on advanced layers such as playlist and slideshow.
$('#movie1').resume();
Related .pause()
SpinetiX wiki source / Guide
Keeps the layer visible, frozen on its last frame, after it ends.
Details
.setFillFreeze() | .setFillFreeze( freeze )
Applies when freeze is undefined or true. Out-effects still run at the end time, so the last frame may be invisible. Call it before adding the layer to the DOM tree.
Returns jSignage layer object
$.image({ href: 'a.jpg', dur: 3 }).setFillFreeze().addTo('svg');
SpinetiX wiki source / Guide
Keeps the layer visible, frozen on its first frame, before it begins.
Details
.setInitialVisibility() | .setInitialVisibility( freeze )
Applies when freeze is undefined or true. In-effects run at the begin time, so the first frame may be invisible. Call it before adding the layer to the DOM tree.
Returns jSignage layer object
$.image({ href: 'a.jpg', begin: 3 }).setInitialVisibility().addTo('svg');
SpinetiX wiki source / Guide
Sets the progress percentage and updates the bar.
Details
.setProgress( progress )
bar.setProgress(75);
SpinetiX wiki source / Guide
Shows the layer if the parameter is true, hides it otherwise.
Details
.setVisible( isVisible )
Calls .show() when isVisible evaluates to true and .hide() otherwise.
Returns jSignage layer object
$('#back').setVisible(false);
Related .show(), .hide()
SpinetiX wiki source / Guide
Makes the layer visible after applying in-effects, same as .begin(0).
Details
.show()
No effect if the layer is already visible. For interactive layers set begin to 'indefinite' so the layer starts hidden. Repeated calls do not reapply the in-effect in most cases; recreate the layer instead.
Returns jSignage layer object
$.image({ id: 'back', href: 'images/1.jpg', begin: 'indefinite' }).addTo('svg');
$('#back').show();
Related .hide()
SpinetiX wiki source / Guide
.slideIn()
# method jSignage In content Slides the layer in, like a projector slide.
Details
.slideIn( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
direction | String | 'random' | 'random', 'rightToLeft', 'leftToRight', 'bottomToTop' or 'topToBottom'. |
Returns jSignage Object
$('#myVideo').slideIn({ dur: '3s', direction: 'leftToRight' });
SpinetiX wiki source / Guide
.slideOut()
# method jSignage In content Slides the layer out, like a projector slide.
Details
.slideOut( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
direction | String | 'random' | 'random', 'rightToLeft', 'leftToRight', 'bottomToTop' or 'topToBottom'. |
Returns jSignage Object
$('#myImage').slideOut({ dur: '0.5s', direction: 'bottomToTop' });
SpinetiX wiki source / Guide
Cubic Bezier curve to (x, y); the first control point mirrors the previous second control point.
Details
.smoothCurveTo( x2, y2, x, y )
SpinetiX wiki source / Guide
Quadratic Bezier curve to (x, y); the control point mirrors the previous one.
Details
.smoothQuadTo( x, y )
SpinetiX wiki source / Guide
Switches a multi-page layer to a new page layer.
Details
.switchPage( layer, transition )
layer must be a jSignage layer object. transition is optional; defaultTransition is used if omitted. It has no return value, so it cannot be chained. The wiki text also writes .switch(null) for switching to an empty page.
page.switchPage($.media({ href: '2.jpg' }), $.crossFade());
SpinetiX wiki source / Guide
Adds or replaces the content of a text area with a string or formatted text object.
Details
.text( formattedTextObject ) | .text( text )
A new line character (\n) in the text becomes a line break, as if $.tbreak() was used. Formatted text is built with $.tspan() and $.tbreak().
Returns jSignage Object
$.textArea({ fontSize: 60 }).text('Line 1\nLine 2').addTo('svg');
Related $.tspan(), $.tbreak()
SpinetiX wiki source / Guide
.textInput()
# event jSignage In content Handles typed text; event.data holds the resulting character.
Details
jSignageLayer.textInput( callback )
Focus-sensitive layers, or on $('svg'). Keys such as Enter or Escape do not trigger it.
| Parameter | Type | Default | Description |
callback | Callback | | Called with one parameter, an object with the event details. |
Returns jSignage Object
$('svg').textInput( function( event ) {
if ( event.data == 'p' ) media.pause();
});
Notes For a layer that includes an svg file with this code, set the layer's 'focusable' attribute to true (Elementi: Layer Properties, Advanced tab).
Related .click()
SpinetiX wiki source / Guide
.wipeIn()
# method jSignage In content Wipes the layer in with one of the SMPTE wipe types.
Details
.wipeIn( [attributesObject] )
If no dur is given the effect lasts 1s.
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
type | String | 'random' | Wipe type per SMPTE 258M-1993: 'random', 'bar', 'box', 'barnDoor', 'iris'. |
subType | String | 'random' | Wipe subtype, depends on type. |
Returns jSignage Object
$('#myImage').wipeIn({ dur: '2s', type: 'barnDoor', subType: 'horizontal' });
SpinetiX wiki source / Guide
.wipeOut()
# method jSignage In content Wipes the layer out with one of the SMPTE wipe types.
Details
.wipeOut( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
type | String | 'random' | Wipe type per SMPTE 258M-1993: 'random', 'bar', 'box', 'barnDoor', 'iris'. |
subType | String | 'random' | Wipe subtype, depends on type. |
Returns jSignage Object
$('#myImage').wipeOut({ dur: '1s', type: 'bar', subType: 'leftToRight' });
SpinetiX wiki source / Guide
.zoomIn()
# method jSignage In content Zooms in from a smaller size while fading in from the background.
Details
.zoomIn( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
factor | String | '20%' | Zoom factor. |
Returns jSignage Object
$('#myVideo').zoomIn();
Related .animateZoom()
SpinetiX wiki source / Guide
.zoomOut()
# method jSignage In content Zooms to a larger size while fading out to the background.
Details
.zoomOut( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Effect duration. |
factor | String | '20%' | Zoom factor. |
Returns jSignage Object
$('#myVideo').zoomOut();
Related .animateZoom()
SpinetiX wiki source / Guide
$._createElement()
# function jSignage In content Creates an SVG element with createElementNS and sets the given attributes.
Details
$._createElement( name, attributes )
| Parameter | Type | Default | Description |
name | String | | SVG element name. |
attributes | Plain Object | | Attributes to set. |
Returns SVG Element
var elem = $._createElement( 'animate', { attributeName: 'opacity', from: 0, to: 1, dur: 10, begin: 0 } );
Notes Returns a DOM object, unlike $.createElement() of the jQuery port, which returns a jSignage Object.
SpinetiX wiki source / Guide
$.<layerType>()
# constructor jSignage In content Creates a layer of the given type from an attributes object. Layers are the building blocks of a jSignage document.
Details
$.<layerType>( { id: 'id', ... } )
layerType is media, textArea, playlist, carousel and so on. A layer is a rectangular region where content is shown during its active interval, 0s to forever by default. Z-order follows the order of elements in the document and cannot be changed. Calling the constructor on a placeholder element replaces it.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Common layer attributes plus attributes of the layer type. |
Returns jSignage layer object
$.media({ id: 'movie1', width: 1280, height: 720, href: 'clip.avi' }).addTo('svg');
Related Common layer attributes
SpinetiX wiki source / Guide
$.ajax()
# function jSignage In content Low-level HTTP request with full control; only GET and POST are supported.
Details
$.ajax( url, [settings] )
The SVG Tiny 1.2 uDOM supports only the GET and POST methods. Posting JSON-RPC to the player's /rpc endpoint can set a Shared Variable.
| Parameter | Type | Default | Description |
url | String | | Request URL. |
settings | Plain Object | | Request settings as in jQuery. Optional. |
$.ajax({ type: 'POST', url: 'http://HMP_address/rpc', contentType: 'application/json', data: JSON.stringify({ method: 'webstorage_set', params: [[ { name: 'var1', value: 'Hello' } ]], id: 1 }) });
SpinetiX wiki source / Guide
Animation layer that shows an SVG or SMIL document.
Details
$.animation( { href, ... } )
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | href plus common layer attributes and media attributes. |
Returns jSignage layer object
$.animation({ href: 'anim.svg' }).addTo('svg');
SpinetiX wiki source / Guide
Audio-only layer. It is not visible.
Details
$.audio( { href, ... } )
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | href plus common layer attributes, for example audioLevel. |
Returns jSignage layer object
$.audio({ href: 'music.mp3', audioLevel: 0.5 }).addTo('svg');
SpinetiX wiki source / Guide
$.carousel()
# constructor jSignage In content Slideshow extension that shows several items at once and lets the viewer drag between them.
Details
$.carousel( { data, renderToSVG, numVisible, type, ... } )
Usually shows previews of the items before and after the selected one. Can replace a table for scrollable menus.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | data and renderToSVG are required. |
Returns jSignage layer object
$.carousel({ data: ['1.jpg', '2.jpg', '3.jpg', '4.jpg'], numVisible: 3, renderToSVG: function() { return $.image({ href: this }); } }).addTo('svg');
Related $.slideshow(), .next(), .previous(), .auto()
SpinetiX wiki source / Guide
$.circle()
# constructor jSignage In content Draws a circle from a center point and a radius.
Details
$.circle( attributes )
Returns jSignage object
$.circle({ cx: 640, cy: 360, r: 200, fill: 'none', stroke: 'red', strokeWidth: 20 }).addTo('svg');
Related Shape fill and stroke attributes
SpinetiX wiki source / Guide
$.clearInterval()
# function jSignage In content Cancels a timer created with $.setInterval() or $.setIntervalSync().
Details
$.clearInterval( timer )
| Parameter | Type | Default | Description |
timer | Timer Object | | Handler returned by $.setInterval(). |
Returns Undefined
Notes The wiki describes it for $.setInterval(); $.setIntervalSync() says its handle can be canceled the same way.
Related $.setInterval()
SpinetiX wiki source / Guide
$.clearTimeout()
# function jSignage In content Cancels a timer created with $.setTimeout().
Details
$.clearTimeout( timer )
| Parameter | Type | Default | Description |
timer | Timer Object | | Handler returned by $.setTimeout(). |
Returns Undefined
$.clearTimeout( timer );
Related $.setTimeout()
SpinetiX wiki source / Guide
$.crawler()
# constructor jSignage In content Scrolls layers of any type across the screen, horizontally or vertically.
Details
$.crawler( { data, renderToSVG, direction, speed, smooth, spacing, ... } )
Horizontal crawlers normalise layer height to one line; vertical crawlers normalise width. Layers added must have absolute pixel width and height; a $.textArea needs only height (horizontal) or width (vertical). Supports .pushData(). $.textTicker() and $.mediaCrawler() specialise it.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | data and renderToSVG are required. |
Returns jSignage layer object
$.crawler({ data: ['A', 'B'], height: 100, repeatCount: 'indefinite', renderToSVG: function() { return $.textArea({ height: 100, fontSize: 'max' }).text(this); } }).addTo('svg');
Related $.textTicker(), $.mediaCrawler(), .pushData()
SpinetiX wiki source / Guide
$.crossFade()
# constructor jSignage In content Cross-fades: the new slide fades in over the previous one as it starts.
Details
$.crossFade( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '1s' | Duration of the transition effect. |
Returns jSignage Transition Object
$.playlist({ data: ['A.jpg', 'B.jpg', 'C.jpg', 'D.jpg'], defaultTransition: $.crossFade() }).addTo('svg');
Related jSignage Transition Object, dur
SpinetiX wiki source / Guide
$.cubeFace()
# constructor jSignage In content Pseudo-3D cube rotation from the current slide to the new one.
Details
$.cubeFace( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Duration of the transition effect. |
direction | String | 'random' | 'random', 'rightToLeft', 'leftToRight', 'bottomToTop' or 'topToBottom'. |
Returns jSignage Transition Object
$.cubeFace({ dur: '1s', direction: 'leftToRight' });
Related jSignage Transition Object, dur
SpinetiX wiki source / Guide
$.DateTimeFormat()
# constructor jSignage In content Class for locale-aware date and time formatting; create it, then call .format( date ).
Details
new $.DateTimeFormat( format [, locale] )
| Parameter | Type | Default | Description |
format | Number | String | | Predefined format such as $.DateTimeFormat.Format.FULL_DATETIME, or a pattern like 'EEEE, MMMM d, y'. |
locale | String | | Locale tag. Default: the default locale. |
Returns Function
$.setLocale( 'es_ES' );
var f = new $.DateTimeFormat( $.DateTimeFormat.Format.LONG_DATE );
var str = f.format( new Date() ); // "24 de abril de 2013"
Related .format(), FULL_DATE, LONG_DATE, MEDIUM_DATE, SHORT_DATE, FULL_TIME, LONG_TIME, MEDIUM_TIME, SHORT_TIME, *_DATETIME, Date format pattern letters, $.setLocale()
SpinetiX wiki source / Guide
$.debug()
# function jSignage In content Adds a log entry at debug level.
Details
$.debug( text )
| Parameter | Type | Default | Description |
text | String | | Log text. |
$.debug( 'message' );
Since jSignage 1.3.0
SpinetiX wiki source / Guide
$.decodeURIQueryString()
# function jSignage In content Parses a URI and returns an object with its query-string pairs.
Details
$.decodeURIQueryString( queryString [, qs_only] )
| Parameter | Type | Default | Description |
queryString | String | | URI or query string of key=value pairs separated by &. |
qs_only | Boolean | | If missing or false, only the query part is processed: text before ? and after # is removed. Optional. |
Returns Plain Object
var uri = document.documentURI;
var jsonParams = $.extend( $.parseJSON($('#jsonParams').text()), $.decodeURIQueryString( uri ) );
SpinetiX wiki source / Guide
$.durInSeconds()
# function jSignage In content Parses a time value and returns seconds, or the default if the value is missing or malformed.
Details
$.durInSeconds( time [, defaultTime] )
| Parameter | Type | Default | Description |
time | Number | String | | Time value with or without unit suffix (h, min, ms). |
defaultTime | Number | 0 | Value used if parsing fails. |
Returns Number
var dur = $.durInSeconds( args && args.dur, 1 );
SpinetiX wiki source / Guide
$.ellipse()
# constructor jSignage In content Draws an ellipse from a center point and two radii.
Details
$.ellipse( attributes )
Returns jSignage object
$.ellipse({ cx: 640, cy: 360, rx: 400, ry: 200, fill: 'none', stroke: 'red', strokeWidth: 20 }).addTo('svg');
Related Shape fill and stroke attributes
SpinetiX wiki source / Guide
$.error()
# function jSignage In content Throws a JavaScript error with the given text.
Details
$.error( text )
| Parameter | Type | Default | Description |
text | String | | Error text. |
$.error( 'bad config' );
SpinetiX wiki source / Guide
$.extend()
# function jSignage In content Port of jQuery.extend: merges objects into the first one.
Details
$.extend( target [, object1 ] [, objectN ] ) | $.extend( [deep,] target, object1 [, objectN ] ) | $.extend( object1 )
With one argument the jSignage object itself is the target, which adds new functions to the jSignage namespace; useful for plugin authors.
Returns Plain Object (jSignage Object with a single argument)
var settings = $.extend( {}, defaults, options );
SpinetiX wiki source / Guide
$.fade()
# constructor jSignage In content Fades out the current slide, then fades in the next from the background.
Details
$.fade( [attributesObject] )
dur is the length of each fade, so the full transition lasts twice dur.
| Parameter | Type | Default | Description |
dur | Number | String | '1s' | Duration of the transition effect. |
color | String | null | Fade color; null is transparent (fade to the background). |
Returns jSignage Transition Object
$.fade({ dur: '1s', color: 'black' });
Related jSignage Transition Object, dur
SpinetiX wiki source / Guide
$.fitTextArea()
# constructor jSignage In content Text area that picks the largest font size at which all the text is visible.
Details
$.fitTextArea( { factors, fontSize, ... } )
Suited to text from an external source such as a news feed, whose length is not known in advance. Relative sizes between $.tspan() parts are kept. With fontSize: 'max' the text is as large as possible; with a number that is the upper limit.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Text layer attributes plus factors. |
Returns jSignage layer object
$.fitTextArea({ fontSize: 'max' }).text('Fit this text.').addTo('svg');
Related $.textArea()
SpinetiX wiki source / Guide
$.flip()
# constructor jSignage In content Flips the current slide over to the new one.
Details
$.flip( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Duration of the transition effect. |
orientation | String | 'random' | Pivot axis: 'random', 'horizontal' or 'vertical'. |
Returns jSignage Transition Object
$.flip({ dur: '1s', orientation: 'horizontal' });
Related jSignage Transition Object, dur
SpinetiX wiki source / Guide
$.g()
# constructor jSignage In content Group layer. Invisible container that sets position and timing for the layers inside it.
Details
$.g( { ... } )
Has no specific attributes or functions. Add sublayers with .add(), or call .addTo() on a sublayer. Effects applied to the group affect all its layers together. The active interval of the group limits that of its sublayers. Use .endsWith() to end a group with a child.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Common layer attributes. |
Returns jSignage layer object
var myGroup = $.g({ width: '80%', height: '80%', top: '10%', left: '10%' }).addTo('svg');
$.media({ href: 'media/SpinetiX.jpg' }).addTo(myGroup);
Related .endsWith(), .add()
SpinetiX wiki source / Guide
$.get()
# function jSignage In content Loads data from the server with an HTTP GET request.
Details
$.get( url, [data], success( data, textStatus ), [dataType] )
| Parameter | Type | Default | Description |
url | String | | Request URL. |
data | Plain Object | String | | Data sent with the request. Optional. |
success | Callback | | Called with the response data and textStatus. |
dataType | String | | Expected response type. Optional. |
$.get( 'feed.rss', function( data ) { var news = $.parseRSS( data ); }, 'text' );
Notes Set dataType to 'text' for feeds, otherwise auto-detection may parse the response as XML. A JSON mime type is parsed automatically unless dataType is 'text'. Browsers may block cross-domain requests; players and Elementi do not.
SpinetiX wiki source / Guide
$.getAndParseFeed()
# function jSignage In content Loads data with an HTTP GET request, then parses the feed data.
Details
$.getAndParseFeed( dataSourceObject, callback, useGetURL )
| Parameter | Type | Default | Description |
dataSourceObject | Plain Object | | Description of the data source. |
callback | Callback | | Called with the parsed data. |
useGetURL | Boolean | | Use getURL() for the request. |
Notes The wiki gives only the signature and one line of description; the dataSourceObject fields are not documented on the Ajax page.
SpinetiX wiki source / Guide
$.getCurrentTime()
# function jSignage In content Gets the current document time in seconds.
Details
$.getCurrentTime()
Returns Number
var t = $.getCurrentTime();
SpinetiX wiki source / Guide
$.getDocumentViewbox()
# function jSignage In content Gets the document viewBox as an object with x, y, width and height.
Details
$.getDocumentViewbox()
Returns Plain Object
var vb = $.getDocumentViewbox();
SpinetiX wiki source / Guide
$.getG2()
# function jSignage In content Returns the inner element that holds the content of a layer drawn with frame decoration.
Details
$.getG2( realMediaTarget )
With frame decoration the real media target is always a <g>, and the content sits one level deeper in a direct child (G2). Always returns the right element, including the target itself.
Related $.getRealMediaTarget(), frame
SpinetiX wiki source / Guide
$.getJSON()
# function jSignage In content Loads JSON data from the server with an HTTP GET request.
Details
$.getJSON( url, [data], success( data, textStatus ) )
| Parameter | Type | Default | Description |
url | String | | Request URL. |
data | Plain Object | String | | Data sent with the request. Optional. |
success | Callback | | Called with the parsed response and textStatus. |
$.getJSON( 'http://Path_to_File_Location/db.php', { table: 'prices', type: 'coffee', subtype: 'latte' }, function( response ) {
$('#price').clearText().tspan( response.price );
});
SpinetiX wiki source / Guide
$.getLocale()
# function jSignage In content Gets the default locale tag.
Details
$.getLocale()
Returns String
var tag = $.getLocale();
SpinetiX wiki source / Guide
$.getRealMediaTarget()
# function jSignage In content Returns the element that carries the layer content, below any effect wrapper elements.
Details
$.getRealMediaTarget( element )
Returns the element itself when no effect is applied, so it is always safe to call. The target is an <image>, <video>, <audio>, <animation>, <textArea> or, most often, a <g> with a spx:layer-type attribute.
Related $.isLayer(), $.getTimingElement(), $.getG2()
SpinetiX wiki source / Guide
$.getTimingElement()
# function jSignage In content Returns the SMIL element whose active interval defines the active interval of a layer.
Details
$.getTimingElement( realMediaTarget )
For audio, video and animation layers it is the real media target itself. For image, textArea and g layers it is the first child, a <set> or <animate> element. Always returns the right element, including the target itself.
Related $.getRealMediaTarget()
SpinetiX wiki source / Guide
$.guessCannedSlidesDur()
# function jSignage In content Computes the total duration of a playlist or slideshow.
Details
$.guessCannedSlidesDur( canned [, defaultDur] )
| Parameter | Type | Default | Description |
canned | Plain Object | Array | | JSON-parsed description of the playlist content. |
defaultDur | Boolean | | Duration to use as default. Optional. |
Returns Number | String
Notes The wiki types defaultDur as Boolean, which looks like a typo for a duration.
SpinetiX wiki source / Guide
$.guessSlideDur()
# function jSignage In content Returns a layer's duration in seconds, 'media' or 'indefinite'.
Details
$.guessSlideDur( ctor, args [, defaultDur] )
| Parameter | Type | Default | Description |
ctor | String | | Constructor type of the layer. |
args | Plain Object | | JSON-parsed layer arguments. |
defaultDur | Boolean | | Duration to use as default. Optional. |
Returns Number | String
Notes The wiki types defaultDur as Boolean, which looks like a typo for a duration.
SpinetiX wiki source / Guide
$.headlineTextArea()
# constructor jSignage In content Single-line text area that sets font size and transform so the text fills the height and is fully visible.
Details
$.headlineTextArea( { scaleMethod, ... } )
Suited to single-line text of unknown length, such as a news headline. Accepts text layer attributes except vertical alignment.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Text layer attributes plus scaleMethod. |
Returns jSignage layer object
$.headlineTextArea({ scaleMethod: 'uniform' }).text('Fit this text.').addTo('svg');
Related $.textArea()
SpinetiX wiki source / Guide
Image layer for static content, bitmap or vector graphics.
Details
$.image( { href, ... } )
An image can also be given as a base64 data URI, such as 'data:image/png;base64,...'.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | href plus common layer attributes and media attributes. |
Returns jSignage layer object
$.image({ href: 'portrait.jpg', frame: { frameColor: 'white' }, layerFit: 'both', width: '50%', height: '50%' }).addTo('svg');
SpinetiX wiki source / Guide
$.info()
# function jSignage In content Adds a log entry at info level.
Details
$.info( text )
| Parameter | Type | Default | Description |
text | String | | Log text. |
$.info( 'message' );
Since jSignage 1.3.0
SpinetiX wiki source / Guide
$.isLayer()
# function jSignage In content Tests whether an element is the real media target of a layer.
Details
$.line()
# constructor jSignage In content Draws a line segment between two points. It needs a stroke to be visible.
Details
$.line( attributes )
A line has no interior, so it is never filled.
Returns jSignage object
$.line({ x1: 640, y1: 0, x2: 640, y2: 720, stroke: 'red', strokeWidth: 5 }).addTo('svg');
Related Shape fill and stroke attributes
SpinetiX wiki source / Guide
$.linearGradient()
# constructor jSignage In content Creates a linear gradient of colors and opacities along a vector, to use as a paint through .ref().
Details
$.linearGradient( attributes )
Not rendered itself. Add it to the document, then pass gradient.ref() to fill, stroke, backColor, frameColor and similar attributes. Its stops can be animated with animateColor and animateOpacity using the stop index as first argument.
Returns jSignage object
var grad = $.linearGradient({ x1: 320, y1: 0, x2: 960, y2: 0, stops: [{ offset: 0, color: 'blue' }, { offset: 1, color: 'red' }] }).addTo('svg');
$.rect({ x: 320, y: 180, width: 640, height: 360, fill: grad.ref() }).addTo('svg');
Notes Use at least two stops; no stops behaves like color 'none', one stop gives a solid color. Stop offsets must not decrease; repeat an offset for a hard edge.
SpinetiX wiki source / Guide
$.media()
# constructor jSignage In content Media layer that picks the right layer type (audio, video, image, animation) from the URI. Preferred for media.
Details
$.media( { href, ... } )
Shows external content from a URI, a local file such as 'media/img.png' or a resource on a remote web server. By default media such as video plays once; use repeatDur: 'indefinite' to loop. Frame decoration has settings that apply to media layers only.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | href plus common layer attributes and media attributes. |
Returns jSignage layer object
$.media({ href: 'images/1.jpg', dur: 5 }).addTo('svg');
Related $.video(), $.image(), $.audio(), $.animation()
SpinetiX wiki source / Guide
$.mediaCrawler()
# constructor jSignage In content Crawler that scrolls media layers, one per data item.
Details
$.mediaCrawler( { data, renderToURI, mediaWidth, mediaHeight, direction, speed, smooth, spacing, ... } )
data is an array of URI strings, or of items if renderToURI is given. Use repeatCount to set how many times all items show; 'indefinite' loops forever. Frame decoration can add a background. Supports .pushData().
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | data is required. |
Returns jSignage layer object
$.mediaCrawler({ data: ['1.jpg', '2.jpg', '3.jpg'], height: 160, repeatCount: 'indefinite' }).addTo('svg');
Related $.crawler(), .pushData()
SpinetiX wiki source / Guide
$.multiPage()
# constructor jSignage In content Area that shows one layer at a time, like the pages of a book; the program switches pages.
Details
$.multiPage( { defaultTransition, pageEnded, ... } )
Initially empty: call .switchPage() at least once to show something. Page changes are driven by code or event handlers, not by data as in a slideshow.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Common layer attributes plus multi-page attributes. |
Returns jSignage layer object
var page = $.multiPage({}).addTo('svg');
page.switchPage($.media({ href: '1.jpg' }));
Related .switchPage()
SpinetiX wiki source / Guide
$.NumberFormat()
# constructor jSignage In content Class for locale-aware number and currency formatting; create it, then call .format( number ).
Details
new $.NumberFormat( format [, locale] )
| Parameter | Type | Default | Description |
format | Number | String | | Predefined format such as $.NumberFormat.Format.DECIMAL, or a pattern like '#.#####'. |
locale | String | | Locale tag. Default: the default locale. |
Returns Function
var f = new $.NumberFormat( '#.#####' );
var str = f.format( Math.PI ); // "3.14159"
Related .format(), DECIMAL, SCIENTIFIC, PERCENT, CURRENCY, Number format pattern characters
SpinetiX wiki source / Guide
$.page()
# constructor jSignage In content Brings the new slide in with a page-in effect while the previous slide fades out quickly.
Details
$.page( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.375s' | Duration of the transition effect. |
Returns jSignage Transition Object
$.page({ dur: '0.5s' });
Related jSignage Transition Object, dur
SpinetiX wiki source / Guide
$.parseCSV()
# function jSignage In content Parses CSV text into an array of row objects keyed by column name.
Details
$.parseCSV( text [, separator, columns, keepNSWSP, keepQuotes] )
By default column names come from the first row, which is then discarded.
| Parameter | Type | Default | Description |
text | String | | CSV content. |
separator | String | ',' | Column separator character. |
columns | Array | | Column names; if given, the first row is treated as data. |
keepNSWSP | Boolean | false | Keep leading and trailing whitespace of unquoted columns. |
keepQuotes | Boolean | false | Do not treat double quotes as special. |
Returns Array of objects
var rows = $.parseCSV( text, ';' );
SpinetiX wiki source / Guide
$.parseICAL()
# function jSignage In content Parses iCalendar text into the events that start in a period, recurring ones included.
Details
$.parseICAL( text, start, end [, maxItems, format] )
Each item has title, description, startDate, endDate, enclosure (event URL), location. The array is sorted by start date.
| Parameter | Type | Default | Description |
text | String | | iCalendar file content. |
start | Date | Number | | Period start, Date or ms since 1970 UTC. |
end | Date | Number | | Period end, Date or ms since 1970 UTC. |
maxItems | Number | 100 | Maximum items returned. |
format | String | | strftime format for dates as strings; Date objects by default. |
Returns Array of objects
$.get( 'calendar.ics', function( data ) {
var now = new Date();
var schedule = $.parseICAL( data, now.getTime(), now.getTime()+1, 1 );
if ( schedule.length > 0 ) $.media({ href: schedule[0].enclosure, repeatCount: 'indefinite' }).addTo('svg');
}, 'text' );
SpinetiX wiki source / Guide
$.parseJSON()
# function jSignage In content Parses JSON text into an object or array.
Details
$.parseJSON( text )
| Parameter | Type | Default | Description |
text | String | | JSON text. |
Returns Object | Array
var item = $.parseJSON('{ "label": "ultimate gadget", "price": 19.99 }');
Notes A malformed string does not throw. $.get() and $.post() parse JSON automatically when the server sends a JSON mime type, unless dataType is 'text'.
SpinetiX wiki source / Guide
$.parseTXT()
# function jSignage In content Splits multi-line text into an array of lines.
Details
$.parseTXT( text )
| Parameter | Type | Default | Description |
text | String | | Multi-line text. |
Returns Array of strings
var lines = $.parseTXT( content );
SpinetiX wiki source / Guide
$.parseXML()
# function jSignage In content Parses an XML string into a DOM document, or null if the XML is invalid.
Details
$.parseXML( text )
The top-level element is the documentElement property.
| Parameter | Type | Default | Description |
text | String | | XML code. |
Returns Document or null
var doc = $.parseXML( '<top><child/></top>' );
var top = doc.documentElement.localName;
SpinetiX wiki source / Guide
$.path()
# constructor jSignage In content Draws the outline of a shape from SVG path data; it can be filled or stroked.
Details
$.path( attributes )
Returns jSignage object
$.path({ fill: 'red', stroke: 'blue', strokeWidth: 3, d: new $.pathData().moveTo(100, 100).lineTo(300, 100).lineTo(200, 300).close() }).addTo('svg');
Related Shape fill and stroke attributes
SpinetiX wiki source / Guide
Builds path data for the d attribute of $.path() with readable chained methods.
Details
new $.pathData()
Every method returns the object, so calls can be chained.
Returns pathData object
var d = new $.pathData().moveTo(100, 100).lineTo(300, 100).lineTo(200, 300).close();
SpinetiX wiki source / Guide
$.pingPongTextArea()
# constructor jSignage In content Text area that scrolls back and forth when the text does not fit.
Details
$.pingPongTextArea( { direction, speed, backSpeed, smooth, delay, backDelay, scrollBack, ... } )
Accepts text layer attributes plus the specific attributes listed as its children.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Text layer attributes plus ping-pong attributes. |
Returns jSignage layer object
$.pingPongTextArea({ fontSize: 'max', speed: 50, scrollBack: true }).text('<--- OK --->').addTo('svg');
Related $.textArea()
SpinetiX wiki source / Guide
$.playlist()
# constructor jSignage In content Sequence of media files (images, video, animation) shown one after the other.
Details
$.playlist( { data, defaultDur, defaultTransition, ... } )
Without an explicit duration a file plays for its media duration; images use defaultDur. The playlist loops with repeatCount or repeatDur set to 'indefinite'. Supports .pushData().
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Common layer attributes plus playlist attributes. |
Returns jSignage layer object
$.playlist({ data: ['smile.jpg', 'frown.jpg', 'grin.jpg'], defaultDur: '10s', repeatCount: 'indefinite' }).addTo('svg');
Related $.slideshow(), .pushData()
SpinetiX wiki source / Guide
$.polygon()
# constructor jSignage In content Draws a closed shape from connected straight segments.
Details
$.polygon( attributes )
For open shapes use $.polyline(). The wiki page writes the call as jSignage.polygon( attributesObject ).
Returns jSignage object
$.polygon({ fill: 'lime', stroke: 'red', strokeWidth: 5, points: ['850, 75', '958, 137.5', '958, 262.5', '850, 325', '742, 262.5', '742, 137.5'] }).addTo('svg');
Related Shape fill and stroke attributes
SpinetiX wiki source / Guide
$.polyline()
# constructor jSignage In content Draws connected straight segments, typically an open shape.
Details
$.polyline( attributes )
For closed shapes use $.polygon().
Returns jSignage object
$.polyline({ fill: 'none', stroke: 'blue', strokeWidth: 5, points: ['50, 375', '150, 375', '150, 325', '250, 325'] }).addTo('svg');
Related Shape fill and stroke attributes
SpinetiX wiki source / Guide
$.post()
# function jSignage In content Loads data from the server with an HTTP POST request.
Details
$.post( url, [data], success( data, textStatus ), [dataType] )
| Parameter | Type | Default | Description |
url | String | | Request URL. |
data | Plain Object | String | | Data sent with the request. Optional. |
success | Callback | | Called with the response data and textStatus. |
dataType | String | | Expected response type. Optional. |
$.post( 'http://server/api', { id: 1 }, function( data ) { $.info( data ); }, 'text' );
SpinetiX wiki source / Guide
$.progressBar()
# constructor jSignage In content Rectangle that fills from left to right to show progress.
Details
$.progressBar( { style, color, ... } )
The interior can be a solid colour, a smooth gradient from the fill colour to the border colour, or a stripe pattern alternating the two.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Common layer attributes plus style and color. |
Returns jSignage layer object
var bar = $.progressBar({ width: 400, height: 40 }).addTo('svg');
bar.setProgress(50);
Related .setProgress()
SpinetiX wiki source / Guide
$.progressWheel()
# constructor jSignage In content Rotating wheel pattern that tells the viewer an asynchronous process is running.
Details
$.progressWheel( { style, color, barCount, ... } )
Has no specific functions. The advanced attributes customise the bars beyond the three styles.
| Parameter | Type | Default | Description |
params | Plain Object | | Common layer attributes plus wheel attributes. |
Returns jSignage layer object
$.progressWheel({ width: 100, height: 100, color: 'white', barCount: 12 }).addTo('svg');
SpinetiX wiki source / Guide
$.push()
# constructor jSignage In content Flies the new slide in while the previous one flies out, like a slide projector.
Details
$.push( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Duration of the transition effect. |
direction | String | 'random' | 'random', 'rightToLeft', 'leftToRight', 'bottomToTop' or 'topToBottom'. |
Returns jSignage Transition Object
$.push({ dur: '1s', direction: 'leftToRight' });
Related jSignage Transition Object, dur
SpinetiX wiki source / Guide
$.pushButton()
# constructor jSignage In content Button frame with a text label or a custom layer inside. Meant for quick prototypes.
Details
$.pushButton( attributesObject ) | $.pushButton( attributesObject, text ) | $.pushButton( attributesObject, layer )
Built on $.g() with a UI-type background frame. Production projects normally use project-specific PNG images instead. It has no specific functions; attach a .click() handler. If no inner content is passed, add a layer later with .add().
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Common layer attributes plus style, color, direction. |
text | String | | Optional plain-text label. |
layer | jSignage Object | | Optional layer shown on the button. |
Returns jSignage Object
$.pushButton({ left: 100, top: 100, width: 200, height: 60 }, 'More').click(function(){ /* handler */ }).addTo('svg');
SpinetiX wiki source / Guide
$.radialGradient()
# constructor jSignage In content Creates a radial gradient of colors and opacities from a center outwards, to use as a paint through .ref().
Details
$.radialGradient( attributes )
Offset 0 is the center (cx, cy) and offset 1 the outer ring at radius r. Add it to the document, then pass gradient.ref() to fill, stroke, backColor or frameColor.
Returns jSignage object
var grad = $.radialGradient({ cx: 640, cy: 40, r: 360, stops: [{ offset: 0, color: '#ffffff' }, { offset: 0.25, color: '#ffffff' }, { offset: 1, color: '#ff0000' }] }).addTo('svg');
$.rect({ x: 460, y: 180, width: 360, height: 360, rx: 75, fill: grad.ref() }).addTo('svg');
Notes No stops behaves like color 'none'; one stop gives a solid color. Stop offsets must not decrease; repeat an offset for a hard edge.
SpinetiX wiki source / Guide
$.random()
# constructor jSignage In content Picks a transition at random.
Details
$.random( [attributesObject] )
Arguments are passed to the chosen transition, so do not use transition-specific ones: their random defaults give a random variant.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Optional; only dur. |
Returns jSignage Transition Object
$.random({ dur: '1s' });
Related jSignage Transition Object, dur
SpinetiX wiki source / Guide
$.randomChoice()
# function jSignage In content Returns one randomly selected item of an array.
Details
$.randomChoice( array )
| Parameter | Type | Default | Description |
array | Array | | Source array. |
var pick = $.randomChoice([ 'A.jpg', 'B.jpg', 'C.jpg' ]);
SpinetiX wiki source / Guide
$.rect()
# constructor jSignage In content Draws a rectangle, with optional rounded corners.
Details
$.rect( attributes )
The wiki page writes the call as jSignage.rect( attributesObject ).
Returns jSignage object
$.rect({ x: 320, y: 180, width: 640, height: 360, rx: 100, stroke: 'red', strokeWidth: 50 }).addTo('svg');
Related Shape fill and stroke attributes
SpinetiX wiki source / Guide
$.scrollingTextArea()
# constructor jSignage In content Text area that scrolls vertically, line by line or page by page, when the text has more lines than fit.
Details
$.scrollingTextArea( { lines, lineDur, pageDur, scrollDur, ... } )
By default the text shows once, for lines x lineDur + (totalLines - lines) x (scrollDur + lineDur) seconds. To jump back to the top and repeat, set repeatDur or repeatCount.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Text layer attributes plus scrolling attributes. |
Returns jSignage layer object
$.scrollingTextArea({ lines: 2, repeatCount: 'indefinite', top: '80%', height: '20%' }).text('Line one\nLine two\nLine three').addTo('svg');
Related $.textArea()
SpinetiX wiki source / Guide
$.setAttributes()
# function jSignage In content Sets the given attributes on an SVG element.
Details
$.setAttributes( element, attributes )
| Parameter | Type | Default | Description |
element | SVG Element | | Element to modify. |
attributes | Plain Object | | Attributes to set. |
Returns Undefined
SpinetiX wiki source / Guide
$.setGetURLFlags()
# function jSignage In content Sets the global caching flags for HTTP GET requests.
Details
$.setGetURLFlags( flags )
GETURL_CACHE_CONTENT saves the resource in the player cache. GETURL_TRACK_CHANGES detects server changes and calls back. GETURL_ALWAYS_CHECK (3.0.1+) forces a check on every request. The first two together are the recommended value.
| Parameter | Type | Default | Description |
flags | Number | | Combination of GETURL_CACHE_CONTENT, GETURL_TRACK_CHANGES, GETURL_ALWAYS_CHECK. |
$.setGetURLFlags( GETURL_CACHE_CONTENT|GETURL_TRACK_CHANGES );
SpinetiX wiki source / Guide
$.setInterval()
# function jSignage In content Runs a callback repeatedly with a fixed delay between calls.
Details
$.setInterval( callback, ms )
| Parameter | Type | Default | Description |
callback | Callback | | Function to run repeatedly. |
ms | Number | | Positive delay between calls, in milliseconds. |
Returns Timer Object
var timer = $.setInterval( function() { $.info('tick'); }, 1000 );
Related $.clearInterval(), $.setIntervalSync()
SpinetiX wiki source / Guide
$.setIntervalSync()
# function jSignage In content Like $.setInterval(), but the first call comes early so timers with the same delay stay in step.
Details
$.setIntervalSync( callback, ms )
The first call happens after a delay most probably shorter than ms, to synchronize multiple timers that share the same delay.
| Parameter | Type | Default | Description |
callback | Callback | | Function to run repeatedly. |
ms | Number | | Positive delay between calls, in milliseconds. |
Returns Timer Object
Since Firmware 3.0.6
Related $.setInterval()
SpinetiX wiki source / Guide
$.setLocale()
# function jSignage In content Sets the default locale and returns the previous one.
Details
$.setLocale( locale )
| Parameter | Type | Default | Description |
locale | String | | Locale tag, e.g. 'es_ES'. |
Returns String
$.setLocale( 'es_ES' );
SpinetiX wiki source / Guide
$.setTimeout()
# function jSignage In content Runs a callback once after a delay.
Details
$.setTimeout( callback, ms )
| Parameter | Type | Default | Description |
callback | Callback | | Function to run after ms. |
ms | Number | 0 | Delay in milliseconds. |
Returns Timer Object
var timer = $.setTimeout( function() { $.info('done'); }, 5000 );
Related $.clearTimeout()
SpinetiX wiki source / Guide
$.shuffle()
# function jSignage In content Returns an array of items selected randomly from the input array.
Details
$.shuffle( array [, limit] )
| Parameter | Type | Default | Description |
array | Array | | Source array. |
limit | Number | | Maximum number of items in the result. Optional. |
Returns Array
var items = $.shuffle([ 'A.jpg', 'B.jpg', 'C.jpg', 'D.jpg' ]);
$.playlist({ data: items, repeatDur: 'indefinite' }).addTo('svg');
SpinetiX wiki source / Guide
$.slide()
# constructor jSignage In content Slides the new slide in over the previous, frozen slide.
Details
$.slide( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Duration of the transition effect. |
direction | String | 'random' | 'random', 'rightToLeft', 'leftToRight', 'bottomToTop' or 'topToBottom'. |
Returns jSignage Transition Object
$.slide({ dur: '1s', direction: 'leftToRight' });
Related jSignage Transition Object, dur
SpinetiX wiki source / Guide
$.slideshow()
# constructor jSignage In content Shows slides one after the other; the layout of each slide is built by your renderToSVG callback.
Details
$.slideshow( { data, renderToSVG, defaultSlideDur, defaultTransition, ... } )
Unlike a playlist, where each item is one media layer, a slide can hold any layers. Loops with repeatCount or repeatDur 'indefinite'. Supports .pushData().
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | data and renderToSVG are required. |
Returns jSignage Object
$.slideshow({ data: rss, defaultSlideDur: 3, renderToSVG: function() { return $.textArea().text(this.title); } }).addTo('svg');
Related $.playlist(), .pushData()
SpinetiX wiki source / Guide
$.solidColor()
# constructor jSignage In content Creates a solid color element to reference later through .ref() in fill, stroke, backColor or frameColor.
Details
$.solidColor( color, opacity )
It must be added to the document to be referenced, anywhere. Color and opacity can be animated with animateColor and animateOpacity.
| Parameter | Type | Default | Description |
color | Color | black | The color. |
opacity | number | 1 | Opacity from 0.0 to 1.0. |
Returns jSignage object
var bColor = $.solidColor('red', 0.5).addTo('svg');
$.textArea({ width: '90%', height: '15%', top: '75%', left: '5%', fontSize: 32, frame: { backColor: bColor.ref() } }).text('Red background !').addTo('svg');
SpinetiX wiki source / Guide
$.svgAnimation()
# function jSignage In content Adds an SVG animation element to a target element; uses SMIL when the player supports it.
Details
$.svgAnimation( target, name, attributesObject ) | $.svgAnimation( target, name, attributesObject, endCallback )
name is one of animate, animateTransform, animateColor, animateMotion. attributesObject holds id, attributeName, timing and value attributes and type-specific ones (type for animateTransform; path, keyPoints, rotate for animateMotion). Use string notation for keyTimes, keySplines and values.
| Parameter | Type | Default | Description |
target | SVG Element | | Element to animate. |
name | String | | Animation tag name. |
attributesObject | Plain Object | | Attributes of the animation. |
endCallback | Callback | | Runs at the end of the animation. Optional. |
Returns SVG Element
var img = $.media({ href: 'media/Fusion.jpg' }).addTo('svg');
$.svgAnimation( img[0], 'animate', { attributeName: 'opacity', from: '1', to: '0', dur: 10, fill: 'freeze' });
Related .animateColor(), .animateMotion(), values
SpinetiX wiki source / Guide
$.table()
# constructor jSignage In content Container layer that arranges child layers in a 1D or 2D grid, with optional staggered start times.
Details
$.table( { rows, columns, data, renderToSVG, primaryOrder, secondaryOrder, ... } )
Cell layers are positioned with a horizontal and/or vertical offset. The table has no specific functions.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Common layer attributes plus table attributes. |
Returns jSignage layer object
$.table({ data: [1, 2, 3, 4], rows: 4, renderToSVG: function() { return $.textArea({ fontSize: 32 }).text('Line ' + this); } }).addTo('svg');
Related $.carousel()
SpinetiX wiki source / Guide
Creates a line break element that breaks the current line even when it is empty.
Details
$.tbreak()
Consecutive tbreak elements each cause a line break.
Returns formatted text object
$.textArea({ fontSize: 40 }).text($.tspan('Item 1').tbreak().tspan('Item 2').tbreak()).addTo('svg');
Related $.tspan()
SpinetiX wiki source / Guide
$.textArea()
# constructor jSignage In content Text layer that wraps plain or formatted text inside a fixed rectangle.
Details
$.textArea( { left, top, width, height, fontSize, ... } )
Set or replace the content with .text(). The font size 'max' fits the text to the area height; text that is too long is truncated, use $.fitTextArea() to show all of it. Text attributes of this entry also apply to the smart text areas.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | Common layer attributes, text alignment attributes and text styling attributes. |
Returns jSignage layer object
$.textArea({ id: 'txt1', width: '90%', height: '15%', top: '80%', left: '5%', fontSize: 60 }).text('Welcome to jSignage demo').addTo('svg');
Related .text(), $.tspan(), $.tbreak()
SpinetiX wiki source / Guide
$.textBar()
# constructor jSignage In content Slideshow specialised for text, typically on one or two lines, one data item after another.
Details
$.textBar( { data, lines, lineDur, scrollDur, transition, renderToText, ... } )
Accepts common layer attributes, frame, alignment and styling attributes. The text is scaled to the full height of the area, so fontSize is ignored. Each item shows for lines x lineDur + (totalLines - lines) x (scrollDur + lineDur) seconds. Supports .pushData().
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | data is required. |
Returns jSignage Object
$.textBar({ data: ['First message', 'Second message'], height: '20%', bottom: 0, lines: 1, lineDur: 2, frame: { backColor: 'white' }, repeatCount: 'indefinite' }).addTo('svg');
Related $.slideshow(), .pushData()
SpinetiX wiki source / Guide
$.textTicker()
# constructor jSignage In content Crawler specialised for text, scrolling across the screen horizontally or vertically.
Details
$.textTicker( { data, direction, speed, spacing, lines, baseLine, smooth, renderToText, ... } )
A horizontal ticker fits one line in its area; a vertical ticker shows several lines. The text is scaled to the full height of the area, so fontSize is ignored. Use repeatCount to set the number of runs; 'indefinite' loops forever. fill and fontFamily set colour and font. Supports .pushData().
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | data is required. |
Returns jSignage layer object
$.textTicker({ data: ['Welcome !', 'Bienvenue !', 'Wilkommen !'], repeatCount: 'indefinite' }).addTo('svg');
Related $.crawler(), .pushData()
SpinetiX wiki source / Guide
$.triggerWithOffset()
# function jSignage In content Builds a valid SVG time point for the begin or end attribute of an animation element.
Details
$.triggerWithOffset( trigger, offset )
| Parameter | Type | Default | Description |
trigger | Array | | Time point used as base. |
offset | Number | | Offset from the trigger, in seconds. |
Returns Number | String
animateElement.setAttribute( 'begin', $.triggerWithOffset( trigger, offset ) );
SpinetiX wiki source / Guide
Creates a formatted text object, with or without styling attributes. Calls can be chained.
Details
$.tspan( text, { stylingAttributes } ) | $.tspan( text )
Chain .tspan() and .tbreak() to build text with mixed styles. A new line character (\n) in text becomes a line break.
Returns formatted text object
$.textArea({ fontSize: 60 }).text(
$.tspan('Welcome to the ').tspan('jSignage', { fill: 'blue' }).tspan(' API demo')
).addTo('svg');
Related $.tbreak(), .text()
SpinetiX wiki source / Guide
$.uiColor
# property jSignage In content Default colour for push buttons and progress bars.
Details
$.uiColor
Used as the default of the color attribute of $.pushButton() and $.progressBar().
Related color (pushButton), color (progressBar)
SpinetiX wiki source / Guide
$.uiStyle
# property jSignage In content Default UI style for push buttons and progress bars.
Details
$.uiStyle = 'round'
Used as the default of the style attribute of $.pushButton() and $.progressBar(). Values used in the wiki: 'manzana', 'round', 'square'.
$.uiStyle = 'round';
Related style (pushButton), style (progressBar)
SpinetiX wiki source / Guide
Video layer, with optional audio.
Details
$.video( { href, ... } )
Videos play once unless repeatCount or repeatDur is set.
| Parameter | Type | Default | Description |
attributesObject | Plain Object | | href plus common layer attributes and media attributes. |
Returns jSignage layer object
$.video({ href: 'clip.avi', id: 'vid1', repeatCount: 'indefinite', width: '50%', height: '50%', top: '25%', left: '25%' }).addTo('svg');
SpinetiX wiki source / Guide
$.warn()
# function jSignage In content Adds a log entry at warning level.
Details
$.warn( text )
| Parameter | Type | Default | Description |
text | String | | Log text. |
$.warn( 'message' );
Since jSignage 1.3.0
SpinetiX wiki source / Guide
$.wipe()
# constructor jSignage In content Wipes the new slide in over the previous, frozen slide with an SMPTE wipe type.
Details
$.wipe( [attributesObject] )
bar: leftToRight, rightToLeft, topToBottom, bottomToTop. box: topLeft, topRight, bottomRight, bottomLeft, topCenter, rightCenter, bottomCenter, leftCenter. barnDoor: vertical, horizontal. iris: rectangle.
| Parameter | Type | Default | Description |
dur | Number | String | '0.5s' | Duration of the transition effect. |
type | String | 'random' | Wipe type per SMPTE 258M-1993: 'random', 'bar', 'box', 'barnDoor', 'iris'. |
subType | String | 'random' | Wipe subtype. |
Returns jSignage Transition Object
$.wipe({ dur: '1s', type: 'barnDoor', subType: 'vertical' });
Related jSignage Transition Object, dur
SpinetiX wiki source / Guide
$.zoom()
# constructor jSignage In content Fades and zooms the new slide in from a smaller size, and zooms it out when it ends.
Details
$.zoom( [attributesObject] )
| Parameter | Type | Default | Description |
dur | Number | String | '1s' | Duration of the transition effect. |
factorIn | String | '20%' | Zoom factor at the beginning. |
factorOut | String | '20%' | Zoom factor at the end. |
keepZooming | Boolean | false | Keep zooming while the slide is shown; factorOut is then ignored. |
Returns jSignage Transition Object
$.slideshow({ begin: '0s', repeatCount: 'indefinite', defaultSlideDur: 5, defaultTransition: $.zoom({ keepZooming: true, factorIn: '10%' }), data: ['This is text:', 'Text is good for you !'], renderToSVG: function() { return $.textArea({ fontSize: 48, fill: 'white' }).tspan( this ); } }).addTo('svg');
Related jSignage Transition Object, dur
SpinetiX wiki source / Guide
Acceleration or deceleration as the ratio from initial to final speed (default 3).
Details
Used by flyIn/flyOut. A value of 1 gives constant speed.
SpinetiX wiki source / Guide
'sum' makes each repeat build on the previous one; 'none' does not.
Details
| Parameter | Type | Default | Description |
accumulate | String | 'none' | 'sum' makes each repeat build on the previous one; 'none' does not. |
SpinetiX wiki source / Guide
'sum' adds the values to the target value; 'replace' overrides it.
Details
| Parameter | Type | Default | Description |
additive | String | 'replace' | 'sum' adds the values to the target value; 'replace' overrides it. |
SpinetiX wiki source / Guide
Global audio level of the layer, between 0 and 1.
Details
audioLevel: 0.5
Default 1.
$.video({ href: 'clip.mp4', audioLevel: 0.5 }).addTo('svg');
SpinetiX wiki source / Guide
Moves through the choices automatically, as if calling .next() periodically.
Details
autoNext: true
Default false.
SpinetiX wiki source / Guide
Time spent on each choice in autoNext mode.
Details
autoNextInterval: '5s'
Default 5s.
SpinetiX wiki source / Guide
Time to stay at the final position before scrolling back.
Details
backDelay: '500ms'
Default: the value of delay.
SpinetiX wiki source / Guide
Scrolling speed of the backward motion, same unit as speed.
Details
backSpeed: 50
Default: the value of speed.
SpinetiX wiki source / Guide
Number of bars.
Details
barCount: 12
Default 12.
SpinetiX wiki source / Guide
Width of the bars as a ratio of the widget size.
Details
barWidth: 0.1
Default depends on style.
SpinetiX wiki source / Guide
Position of the font base line, in percent.
Details
baseLine: 30
Default 30.
SpinetiX wiki source / Guide
Begin time of the layer: a delay, 'now', 'now+offset' or 'indefinite'.
Details
begin: 2.5 | '2500ms' | 'now' | 'now+1s' | 'indefinite'
A number or time string is a delay relative to the begin of the parent layer, e.g. 2.5 or '2500ms'. 'now' begins the layer when .add() is called; 'now+1s' adds an offset to that. 'indefinite' waits for .begin() or .show(). A fixed offset on a layer added after its parent has begun may show the layer only in part or not at all. Default: 0 when the parent is not in the rendering tree, 'now' otherwise.
$.image({ href: 'images/3.jpg', begin: 5, dur: 5 }).addTo('svg');
SpinetiX wiki source / Guide
When the animation starts, relative to the layer start, or 'indefinite'.
Details
Used by animateColor, animateOpacity, animateMotion, animateRotate, animateZoom and svgAnimation. 'indefinite' means it is started with the .begin() layer function.
| Parameter | Type | Default | Description |
begin | Number | String | 0 | When the animation starts, relative to the layer start, or 'indefinite'. |
SpinetiX wiki source / Guide
Position of the bottom of the layer relative to the bottom of its parent layer.
Details
bottom: '20%'
Absolute or relative value. Default 'auto'.
$.image({ href: 'images/bottom.jpg', width: '20%', height: '20%', bottom: '20%', right: '0%' }).addTo('svg');
SpinetiX wiki source / Guide
Relative offset for the animation. Ignored if values is set.
Details
A by animation equals a values array of [ 0, by ] with additive 'sum'.
| Parameter | Type | Default | Description |
by | Number | String | | Relative offset for the animation. Ignored if values is set. |
SpinetiX wiki source / Guide
Interpolation mode: 'discrete', 'linear', 'paced' or 'spline'.
Details
Default is 'linear', except for .animateMotion() where it is 'paced'.
| Parameter | Type | Default | Description |
calcMode | String | 'linear' | Interpolation mode: 'discrete', 'linear', 'paced' or 'spline'. |
SpinetiX wiki source / Guide
Extra padding between cells, in pixels or percent.
Details
cellPadding: 10
A relative value refers to the greater of the width or height. Default 0.
SpinetiX wiki source / Guide
Fade color, or null (default) to fade to and from the background.
Details
Colour of the bar.
Details
color: 'blue'
Default $.uiColor.
SpinetiX wiki source / Guide
Colour of the bars.
Details
color: 'white'
Default 'white'.
SpinetiX wiki source / Guide
Colour of the button background.
Details
color: 'grey'
Default $.uiColor.
SpinetiX wiki source / Guide
columnPadding (table)
in $.table() # attribute jSignage In content Extra padding between columns, in pixels or percent of the table width.
Details
columnPadding: 10
Default 0.
SpinetiX wiki source / Guide
Number of columns, or an array of column widths.
Details
columns: 2
Default 1.
SpinetiX wiki source / Guide
Common layer attributes
# attribute jSignage In content Attributes accepted by every jSignage layer: position, size, timing, opacity, transform and frame.
Details
$.<layerType>({ left, top, right, bottom, width, height, begin, dur, min, max, repeatCount, repeatDur, opacity, audioLevel, transform, viewBox, frame, id })
Each attribute is its own entry. Layer types add their own attributes on top of these.
$.image({ id: 'logo', href: 'logo.png', left: 100, top: 50, width: '20%', height: '20%', begin: 2, dur: 5 }).addTo('svg');
Related $.<layerType>()
SpinetiX wiki source / Guide
X coordinate of the center.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
X coordinate of the center.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
X coordinate of the center of the gradient circle.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Y coordinate of the center.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Y coordinate of the center.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Y coordinate of the center of the gradient circle.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Path data with moveto, line, curve (cubic and quadratic Bezier) and closepath commands; a $.pathData object is accepted.
Details
Type: String or Object.
SpinetiX wiki source / Guide
One-dimensional array of the choices. Required.
Details
data: [a, b, c]
An object with a length property is enough if no data is needed.
SpinetiX wiki source / Guide
Array of items to show. Required.
Details
data: [a, b, c]
Items are passed to renderToSVG.
SpinetiX wiki source / Guide
Array of URIs, or of items when renderToURI is set. Required.
Details
data: ['1.jpg', '2.jpg']
SpinetiX wiki source / Guide
Array of playlist elements: URI strings or descriptor objects.
Details
data: ['a.jpg', { href: 'b.mp4', dur: 'media', transition: $.crossFade() }]
A descriptor object has href (the only required field), dur (seconds; 'media' by default for video and animation, defaultDur for images) and transition (from the previous element; defaultTransition if omitted).
$.playlist({ data: ['a.jpg', { href: 'b.jpg', dur: 8 }] }).addTo('svg');
SpinetiX wiki source / Guide
Array with the data of each slide. Required.
Details
data: [item1, item2] | { length: 3 }
At minimum an object with a length property, such as { length: 3 }.
SpinetiX wiki source / Guide
Data for the cells: a 1D or 2D array, an array of layers, or null.
Details
data: [['Quick check', 20], ['Winter pack', 50]]
Values are passed to renderToSVG. If renderToSVG is not defined, data must hold jSignage layers. null needs renderToSVG. A 1D array fills cells in primaryOrder, then secondaryOrder; a 2D array maps inner arrays to the primary direction, which allows a variable number of cells. Default null.
SpinetiX wiki source / Guide
Array of items to show. Required.
Details
data: ['text 1', 'text 2']
Items are passed to renderToText.
SpinetiX wiki source / Guide
Array of items to show. Required.
Details
data: ['text 1', 'text 2']
Items are passed to renderToText.
SpinetiX wiki source / Guide
Unicode CLDR pattern letters for date and time formats.
Details
$.DateTimeFormat( 'EEEE, MMMM d, y hh:mm a' )
Supported (fully or partly): G y u U r Q q M L d g E e c; a h H K k m s S A; z Z v. Not supported: w W Y D F b B O V X x. Quote literal text in apostrophes ('of'); two apostrophes give one. Numerals: prefix #hanidec# for all fields or #d=hanidays# per field; time fields cannot be overridden.
new $.DateTimeFormat( "d 'of' MMMM" ) // "14 of April"
SpinetiX wiki source / Guide
Predefined number formats.
Details
$.NumberFormat.Format.DECIMAL
DECIMAL is the default (generic decimals). SCIENTIFIC or E: scientific notation. PERCENT or %: percent values such as 12%. CURRENCY or $: currency values such as $12.00 for the US locale.
SpinetiX wiki source / Guide
Duration of images in the playlist.
Details
defaultDur: 10
Default 5 seconds.
SpinetiX wiki source / Guide
Default gap at the beginning of each slide, including the first.
Details
defaultGap: 0
Default 0.
SpinetiX wiki source / Guide
Default duration of slides without their own duration.
Details
defaultSlideDur: 5
Default 'indefinite': a slide with no duration shows forever.
SpinetiX wiki source / Guide
Default transition between pages.
Details
defaultTransition: $.crossFade()
Default null: no transition.
SpinetiX wiki source / Guide
Default transition from the previous element.
Details
defaultTransition: $.crossFade()
Used when an element has no transition of its own.
SpinetiX wiki source / Guide
Default transition between slides.
Details
defaultTransition: $.push({ direction: 'rightToLeft' })
Default null: no transition.
SpinetiX wiki source / Guide
Time to stay at the initial position before scrolling starts.
Details
delay: '500ms'
Default '500ms'.
SpinetiX wiki source / Guide
Extra delay between the start times of each cell.
Details
delay: 0.2
Default 0.
SpinetiX wiki source / Guide
Controls the Unicode bidirectional text layout algorithm.
Details
direction: 'rtl'
CSS direction property. Can be set on the text area or on parts of formatted text.
SpinetiX wiki source / Guide
Direction of motion: random (default), rightToLeft, leftToRight, bottomToTop, topToBottom.
Details
Used by slideIn/slideOut, flyIn/flyOut and cubeFaceIn/cubeFaceOut.
SpinetiX wiki source / Guide
Direction of motion: random (default), rightToLeft, leftToRight, bottomToTop, topToBottom.
Details
Used by slide, push and cubeFace.
SpinetiX wiki source / Guide
Presentation order of the choices.
Details
direction: 'leftToRight'
'leftToRight', 'rightToLeft', 'topToBottom' or 'bottomToTop'. Default 'leftToRight'.
SpinetiX wiki source / Guide
Crawling direction.
Details
direction: 'rightToLeft'
'leftToRight', 'rightToLeft', 'topToBottom' or 'bottomToTop'. Default 'rightToLeft'.
SpinetiX wiki source / Guide
Crawling direction.
Details
direction: 'rightToLeft'
'leftToRight', 'rightToLeft', 'topToBottom' or 'bottomToTop'. Default 'rightToLeft'.
SpinetiX wiki source / Guide
Scrolling direction.
Details
direction: 'rightToLeft'
'rightToLeft', 'leftToRight', 'bottomToTop' or 'topToBottom'. Default 'rightToLeft'.
SpinetiX wiki source / Guide
Shapes the button to point left or right.
Details
direction: 'left'
'left', 'right' or 'none'. Default 'none'.
SpinetiX wiki source / Guide
Scrolling direction.
Details
direction: 'rightToLeft'
'leftToRight', 'rightToLeft', 'topToBottom' or 'bottomToTop'. Default 'rightToLeft'.
SpinetiX wiki source / Guide
Vertical alignment of the text inside a text area.
Details
displayAlign: 'center' | 'before' | 'after'
'center', 'before' (top) or 'after' (bottom). Default 'center'. Text area level only.
$.textArea({ displayAlign: 'before' }).text('Top').addTo('svg');
SpinetiX wiki source / Guide
Enables touch navigation by dragging the carousel.
Details
draggable: true
Default true.
SpinetiX wiki source / Guide
Duration of the active period of the layer.
Details
dur: 5 | '5s' | 'media'
If not specified, or 'media', the intrinsic duration of the layer is used, for example the clip length of a video.
$.media({ href: 'images/1.jpg', dur: 5 }).addTo('svg');
SpinetiX wiki source / Guide
Animation duration in seconds, or 'indefinite'.
Details
Used by all animate functions and svgAnimation.
| Parameter | Type | Default | Description |
dur | Number | String | 0 | Animation duration in seconds, or 'indefinite'. |
SpinetiX wiki source / Guide
Duration of an effect; the default is usually '0.5s'.
Details
Common to all effects. Wipe-in without dur lasts 1s; blink and nudge describe their own dur.
SpinetiX wiki source / Guide
Duration of the transition effect(s); the default is usually '0.5s'.
Details
Common to all transitions. For transitions with two effects (fade) each effect lasts dur. Defaults: crossFade, fade, zoom 1s; page 0.375s; others 0.5s.
SpinetiX wiki source / Guide
Duration of the exit effect (default 0); prolongs the previous slide by this value.
Details
All media on the slide are frozen during the extra time.
SpinetiX wiki source / Guide
Duration of the in effect (default 0).
Details
Duration of the out effect (default 0).
Details
Zoom factor of zoomIn/zoomOut (default '20%').
Details
Zoom factor of the zoom transition at the beginning (default '20%').
Details
Zoom factor of the zoom transition at the end (default '20%').
Details
Scaling steps for the font size: 'fine', 'coarse' or an array of factors.
Details
factors: 'fine' | 'coarse' | [1, 2, 4]
'fine' is the default. 'coarse' is preferred when several text areas on the page should be aligned. An array of integer factors such as [1,2,4] aligns the baselines of side-by-side areas.
$.fitTextArea({ left: '0%', width: '33%', fontSize: 150, factors: [1,2,4], displayAlign: 'before' }).text('Small text').addTo('svg');
SpinetiX wiki source / Guide
Text colour.
Details
fill: 'blue'
Can be set on the text area or on parts of formatted text.
$.tspan('Welcome to ').tspan('jSignage', { fill: 'blue' });
SpinetiX wiki source / Guide
'freeze' keeps the last value after the animation ends; 'remove' removes the effect.
Details
Used by all animate functions and svgAnimation.
| Parameter | Type | Default | Description |
fill | String | 'remove' | 'freeze' keeps the last value after the animation ends; 'remove' removes the effect. |
SpinetiX wiki source / Guide
Interior paint: 'none', a solid color or a gradient reference.
Details
Type: Paint. Default: 'black'.
SpinetiX wiki source / Guide
Opacity of the interior, 0.0 to 1.0.
Details
Type: Number. Default: 1.
SpinetiX wiki source / Guide
Rule deciding which areas are inside the shape: 'nonzero', 'evenodd' or 'inherit'.
Details
Type: String. Default: 'nonzero'.
SpinetiX wiki source / Guide
Font used to render the text.
Details
fontFamily: 'Arial'
Can be set on the text area or on parts of formatted text.
SpinetiX wiki source / Guide
Font size. The special value 'max' fits the text to the height of the text area.
Details
fontSize: 60 | '60px' | 'max'
'max' is valid at text area level only. A number or a string such as '60px' sets a fixed size.
$.textArea({ width: '90%', height: '15%', fontSize: 'max' }).text('Welcome').addTo('svg');
SpinetiX wiki source / Guide
Italic or normal text.
Details
fontStyle: 'italic'
'normal' (default) or 'italic'.
SpinetiX wiki source / Guide
Normal or small-caps glyphs for lowercase characters.
Details
fontVariant: 'small-caps'
'normal' (default) or 'small-caps'.
SpinetiX wiki source / Guide
Boldness of the font relative to other fonts of the family.
Details
fontWeight: 'bold'
'normal' (default), 'bold', 'bolder' or 'lighter'.
$.tspan(this.title, { fontWeight: 'bold' });
SpinetiX wiki source / Guide
Optional frame decoration object: background, frame, corners, shadow, padding.
Details
frame: { backColor: 'white', shape: 'round' }
Default null. See the frame decoration entries for the keys. The frame cannot be changed with .attr(); the layer has to be recreated.
$.textArea({ frame: { backColor: 'white', frameColor: 'black' } }).text('Hello').addTo('svg');
SpinetiX wiki source / Guide
frame.backColor
in frame # attribute jSignage In content Colour of the layer background. Layers are transparent by default.
Details
frame: { backColor: 'white' }
Default 'none'.
$.textArea({ frame: { backColor: 'white', frameColor: 'black' } }).text('Hello').addTo('svg');
SpinetiX wiki source / Guide
frame.backOpacity
in frame # attribute jSignage In content Opacity of the background.
Details
frame: { backColor: 'blue', backOpacity: 0.5 }
Default '100%'.
SpinetiX wiki source / Guide
frame.clip
in frame # attribute jSignage In content Controls whether content is clipped at the corners: 'none', 'auto' or 'force'.
Details
frame: { clip: 'auto' }
Clipping hides content outside the frame shape behind the opaque screenColor. 'auto' (default) clips only media layers with content outside the shape.
SpinetiX wiki source / Guide
frame.corners
in frame # attribute jSignage In content Array of the corners whose shape is changed.
Details
frame: { shape: 'snip', corners: [ 'topRight', 'bottomLeft' ] }
Default [ 'topLeft', 'topRight', 'bottomRight', 'bottomLeft' ]. Elements must appear in that order.
$.media({ left: '35%', top: '25%', width: 400, height: 300, href: 'image_4_3.jpg', frame: { screenColor: 'white', shape: 'snip', corners: ['topRight', 'bottomLeft'] } }).addTo('svg');
SpinetiX wiki source / Guide
frame.frameColor
in frame # attribute jSignage In content Colour of the frame. 'none' draws no frame.
Details
frame: { frameColor: 'white' }
Default 'none'. The frame sits inside the area of the layer and reduces the content area; the aspect ratio is kept by clipping content at the border.
$.image({ href: 'portrait.jpg', frame: { frameColor: 'white' } }).addTo('svg');
SpinetiX wiki source / Guide
frame.frameSize
in frame # attribute jSignage In content Size of the frame.
Details
frame: { frameColor: 'white', frameSize: '5%' }
Pixels or percent of the smaller of layer width and height. Default '6%'.
SpinetiX wiki source / Guide
frame.padding
in frame # attribute jSignage In content Padding between the layer borders and its content.
Details
frame: { padding: '5%' }
One value for all borders, or four values (top, right, bottom, left) separated by spaces. Each is pixels or percent of the smaller of layer width and height. Default '0'.
SpinetiX wiki source / Guide
frame.rx
in frame # attribute jSignage In content Horizontal size of non-square corners, the radius for round corners.
Details
frame: { shape: 'round', rx: '10%' }
Pixels or percent of the smaller of layer width and height. Default '20%'.
SpinetiX wiki source / Guide
frame.ry
in frame # attribute jSignage In content Vertical size of non-square corners.
Details
frame: { shape: 'round', ry: '15%' }
Default: equal to rx. If different, round corners become elliptical.
SpinetiX wiki source / Guide
frame.screenColor
in frame # attribute jSignage In content Colour of the screen area around a media frame; default for decoration effects that must match the screen.
Details
frame: { screenColor: 'white' }
Default 'currentColor'.
$.media({ href: 'a.jpg', frame: { screenColor: 'white', shape: 'round' } }).addTo('svg');
SpinetiX wiki source / Guide
frame.shadow
in frame # attribute jSignage In content When true, draws a semi-transparent shadow around the layer borders.
Details
frame: { shadow: true }
The shadow is drawn outside the layer area and does not change the content size. Default false. Looks best on white or bright backgrounds.
$.media({ left: 120, top: 30, width: 400, height: 300, href: 'image_4_3.jpg', frame: { frameColor: 'white', frameSize: '5%', shadow: true } }).addTo('svg');
SpinetiX wiki source / Guide
frame.shadowColor
in frame # attribute jSignage In content Colour of the shadow.
Details
frame: { shadow: true, shadowColor: '#808080' }
Default '#A0A0A0'.
SpinetiX wiki source / Guide
frame.shadowSize
in frame # attribute jSignage In content Size of the drop shadow.
Details
frame: { shadow: true, shadowSize: '5%' }
Pixels or percent of the smaller of layer width and height. Default '3%'.
SpinetiX wiki source / Guide
frame.shape
in frame # attribute jSignage In content Shape of the corners: 'square', 'round' or 'snip'.
Details
frame: { shape: 'round' }
Default 'square'. For round and snip the background must be one uniform colour equal to screenColor, and the media aspect ratio must match the layer for the corners to show.
$.media({ left: '10%', top: '20%', width: 640, height: 480, href: 'image_4_3.jpg', frame: { screenColor: 'white', shape: 'round' } }).addTo('svg');
SpinetiX wiki source / Guide
frame.softEdge
in frame # attribute jSignage In content When true, draws a mask over the media that blends its borders into the background.
Details
frame: { softEdge: true }
Default false. The media aspect ratio must match the layer for the soft edges to apply correctly.
$.media({ left: '10%', top: '10%', width: '80%', height: '80%', href: 'image_16_9.jpg', frame: { softEdge: true, screenColor: 'white', softEdgeSize: '10%' } }).addTo('svg');
SpinetiX wiki source / Guide
frame.softEdgeColor
in frame # attribute jSignage In content Colour used to soften the borders.
Details
frame: { softEdge: true, softEdgeColor: 'white' }
Default: frameColor if a frame is set, otherwise screenColor.
SpinetiX wiki source / Guide
frame.softEdgeSize
in frame # attribute jSignage In content Size of the soft edge gradient.
Details
frame: { softEdge: true, softEdgeSize: '10%' }
Pixels or percent of the smaller of layer width and height. Default '6%'.
SpinetiX wiki source / Guide
frame.specialFX
in frame # attribute jSignage In content Special effect around the layer: 'reflection' or 'rotate'.
Details
frame: { specialFX: 'reflection' }
reflection draws a mirror image at the bottom; rotate draws a pseudo-3D paper sheet effect. For reflection the screen behind must be one constant colour, set as reflectionColor or by default screenColor.
Notes On a video or animation layer a special effect causes a severe performance penalty; test the project.
SpinetiX wiki source / Guide
frame.uiStyle
in frame # attribute jSignage In content Applies one of the UI styles to the background: 'manzana', 'round' or 'square'.
Details
frame: { uiStyle: 'round' }
Default null.
SpinetiX wiki source / Guide
Freezes animations and media while transition effects run.
Details
freezeDuringEffects: true
Adds the in and out effect durations to each slide. Default false.
SpinetiX wiki source / Guide
Start value of the animation. Ignored if values is set.
Details
A from-to animation equals a values array of [ from, to ].
| Parameter | Type | Default | Description |
from | Number | String | | Start value of the animation. Ignored if values is set. |
SpinetiX wiki source / Guide
FULL_DATE, LONG_DATE, MEDIUM_DATE, SHORT_DATE, FULL_TIME, LONG_TIME, MEDIUM_TIME, SHORT_TIME, *_DATETIME
in $.DateTimeFormat() # attribute jSignage In content Predefined date and time formats; they can be combined with a space.
Details
$.DateTimeFormat.Format.FULL_DATETIME
en_US output: FULL_DATE 'Tuesday, April 14, 2015'; LONG_DATE 'April 14, 2015'; MEDIUM_DATE 'Apr 14, 2015'; SHORT_DATE '4/14/15'; FULL_TIME and LONG_TIME '10:10:34 PM GMT-05:00'; MEDIUM_TIME '10:10:34 PM'; SHORT_TIME '10:10 PM'. FULL_DATETIME, LONG_DATETIME, MEDIUM_DATETIME, SHORT_DATETIME join the date and time of the same size.
new $.DateTimeFormat( 'LONG_DATE SHORT_TIME' )
Notes Combining as 'LONG_DATE SHORT_TIME' is documented for widget format strings on the Localization page.
SpinetiX wiki source / Guide
Slide-specific delay from the previous slide. Set on the layer returned by renderToSVG.
Details
return $.g({ gap: 1 })
Overrides defaultGap for that slide.
SpinetiX wiki source / Guide
Coordinate system for x1, y1, x2, y2: 'userSpaceOnUse' or 'objectBoundingBox'.
Details
Type: String. Default: 'userSpaceOnUse'.
Notes With 'objectBoundingBox' the coordinates must be between 0 and 1 for the gradient to be visible.
SpinetiX wiki source / Guide
Absolute or relative height of the layer.
Details
height: '50%'
Default 'auto'.
$.video({ href: 'clip.mp4', width: '50%', height: '50%' }).addTo('svg');
SpinetiX wiki source / Guide
Height of the rectangle.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
URI of the content source. Required.
Details
$.media({ href: 'media/img.png' })
A local file such as 'media/img.png' or a resource on the remote web server.
$.media({ href: 'smile.jpg' }).addTo('svg');
SpinetiX wiki source / Guide
Unique string that identifies the layer for later selection with $('#id').
Details
id: 'back'
Strongly recommended.
$.image({ id: 'back', href: 'images/1.jpg' }).addTo('svg');
$('#back').hide();
SpinetiX wiki source / Guide
Inner radius of the bars as a ratio of the widget size.
Details
innerRadius: 0.3
Default depends on style.
SpinetiX wiki source / Guide
Callback to change playlist parameters before each new iteration starts.
Details
iterating: function( iter ) { ... }
Called once before the first iteration and before each repeat. this is the playlist parameters; data, defaultTransition, looping and loopCount can be changed. The return value is ignored.
$.playlist({ iterating: function() { this.data = $.shuffle(list); }, repeatCount: 'indefinite' }).addTo('svg');
SpinetiX wiki source / Guide
Callback to change slideshow parameters before each new iteration starts.
Details
iterating: function( iter ) { ... }
Called once before the first iteration and before each repeat, with the iteration count (0 first). this is the slideshow parameters; data, defaultTransition, looping, loopCount, renderToSVG and defaultGap can be changed. The return value is ignored.
SpinetiX wiki source / Guide
jSignage Transition Object
# property jSignage In content Plain object that defines a transition: durations and wrap callbacks for in, out and exit effects.
Details
A transition has up to three effects: in (starts with the new slide), out (runs when the slide finishes) and exit (applied to the finished slide as the next starts). wrapOut is ignored when the transition is interactive or the media duration is unknown; wrapExit has no such limit.
$.crossFade = function( args ) {
var dur = $.durInSeconds( args && args.dur, 1 );
return {
durIn: dur, durExit: dur,
wrapIn: function( trigger ) {
$.svgAnimation( this, 'animate', { attributeName: 'opacity', from: '0', to: '1', begin: trigger, dur: dur });
}
};
};
Related $.durInSeconds(), $.svgAnimation()
SpinetiX wiki source / Guide
jSignage() / $()
# function jSignage In content Global jSignage function. $ is its alias. Called with no parameters it returns the jSignage object itself.
Details
jSignage() | $() | $( selector ) | $( handler )
Many member functions return the jSignage object, so calls can be chained. $( selector ) wraps matching elements, for example $('svg') or $('#id'). $( handler ) runs the handler once the document is ready.
$.media({ href: 'smile.jpg' }).addTo('svg');
Related .ready()
SpinetiX wiki source / Guide
If true, the slide keeps zooming while displayed and factorOut is ignored (default false).
Details
Maps keyTimes to relative distances (0 to 1) along the motion path.
Details
Array of numbers with exactly as many elements as keyTimes.
SpinetiX wiki source / Guide
Bezier control points for 'spline' calcMode, one fewer set than keyTimes.
Details
Each control point is 'x1 y1 x2 y2'. Use an array of strings for animate functions and a string for svgAnimation().
| Parameter | Type | Default | Description |
keySplines | Array | String | | Bezier control points for 'spline' calcMode, one fewer set than keyTimes. |
SpinetiX wiki source / Guide
Times from 0 to 1 that set when each of the values is used.
Details
Use an array of numbers for animate functions and a string for svgAnimation(). Without keyTimes all values get the same duration.
| Parameter | Type | Default | Description |
keyTimes | Array | String | | Times from 0 to 1 that set when each of the values is used. |
SpinetiX wiki source / Guide
Alignment of a layer that was shrunk by layerFit inside its nominal viewport.
Details
layerAlign: 'center'
One of 'topLeft', 'topMid', 'topRight', 'midLeft', 'center', 'midRight', 'bottomLeft', 'bottomMid', 'bottomRight'. Default 'center'.
SpinetiX wiki source / Guide
Adapts the layer size to the aspect ratio of its media.
Details
layerFit: 'none' | 'horizontal' | 'vertical' | 'both'
'horizontal' narrows the width, 'vertical' shortens the height, 'both' does either, 'none' keeps the size. The layer never grows beyond the specified size. Default 'none'.
$.image({ href: 'portrait.jpg', layerFit: 'both', width: '50%', height: '50%' }).addTo('svg');
Since Firmware 3.0
SpinetiX wiki source / Guide
Position of the left side of the layer relative to the left side of its parent layer.
Details
left: '25%'
Absolute or relative value. Default 'auto'.
$.video({ href: 'clip.mp4', left: '25%', top: '25%', width: '50%', height: '50%' }).addTo('svg');
SpinetiX wiki source / Guide
Stroke style of the bars, as the SVG stroke-linecap property.
Details
lineCap: 'round'
Default depends on style.
SpinetiX wiki source / Guide
Duration of each line in seconds.
Details
lineDur: 1.5
Default 1.5, must be greater than 0. With n lines in the area, the text is static for n x lineDur seconds, then scrolls and shows each line for lineDur.
SpinetiX wiki source / Guide
Duration of each line in seconds.
Details
lineDur: 2
Default 1, must be greater than 0.
SpinetiX wiki source / Guide
Line spacing: offset between successive lines.
Details
lineIncrement: 'auto' | 60
'auto' or a number. Default 'auto'. Text area level only.
$.textArea({ fontSize: '50px', displayAlign: 'before', lineIncrement: 60 }).text('Hello').addTo('svg');
SpinetiX wiki source / Guide
Number of lines that fit in the area.
Details
Number of lines that fit in the area.
Details
Number of lines in the area. Vertical directions only.
Details
Locale tags
# property jSignage In content Locale identifiers: language and region subtags plus an optional script subtag, e.g. en_US (default).
Details
en_US, zh_Hans_CN, es_MX
Firmware 4.1.0 and later support all CLDR 'modern' coverage locales (list: cldr-core 29.0.0 availableLocales.json). Firmware 3.x and 4.0.x support the table on the Locale codes page.
Related $.setLocale(), $.getLocale()
SpinetiX wiki source / Guide
Loops to the first choice after the last, and the reverse.
Details
looping: true
Default false.
SpinetiX wiki source / Guide
Maximum duration of the active period of the layer.
Details
Maximum duration of any element; videos are clipped.
Details
maximumDur: 30
Default: no maximum.
SpinetiX wiki source / Guide
Maximum duration of any single slide.
Details
maximumSlideDur: 30
Default 'indefinite'.
SpinetiX wiki source / Guide
Alignment of the media inside the layer when the aspect ratios differ.
Details
mediaAlign: 'center'
One of 'topLeft', 'topMid', 'topRight', 'midLeft', 'center', 'midRight', 'bottomLeft', 'bottomMid', 'bottomRight'. Default 'center'.
SpinetiX wiki source / Guide
How the media is fitted inside the viewport of the layer.
Details
mediaFit: 'meet' | 'fill' | 'slice'
'fill' stretches width and height independently, possibly altering the aspect ratio. 'meet' scales uniformly to fit entirely inside, possibly leaving empty area. 'slice' scales uniformly to cover the viewport, possibly cropping. Default 'meet'.
$.image({ href: 'a.jpg', mediaFit: 'slice' }).addTo('svg');
Since Firmware 3.0 for 'slice'
SpinetiX wiki source / Guide
Height of each media, used for its aspect ratio.
Details
mediaHeight: 90
The media is scaled to fit exactly one line. Default 90.
SpinetiX wiki source / Guide
Width of each media, used for its aspect ratio.
Details
mediaWidth: 160
The media is scaled to fit exactly one line. Default 160.
SpinetiX wiki source / Guide
MIME type of the content, for when the server or the file extension does not give it correctly.
Details
mimetype: 'auto'
Default 'auto'.
SpinetiX wiki source / Guide
Minimum duration of the active period of the layer.
Details
Minimum duration of any element; videos are extended by freezing the last frame.
Details
minimumDur: 3
Default: no minimum.
SpinetiX wiki source / Guide
Minimum duration of any single slide.
Details
minimumSlideDur: 2
Default 0.
SpinetiX wiki source / Guide
Maximum horizontal motion of nudge, pixels or percent; positive to the right.
Details
Maximum vertical motion of nudge, pixels or percent; positive toward the bottom.
Details
Maximum zoom of nudge in percent; positive zooms in, negative shrinks (default '0%').
Details
Unicode CLDR number pattern characters.
Details
$.NumberFormat( '#,###.00' )
Supported: 0 (zero padding), @ (significant digit), # (digit), . (decimal separator), , (grouping), - , + , E, %, per mille, currency sign, ; (sub-pattern). Not supported: 1-9 (rounding), * (padding). A pattern with @ is a significant-digits pattern: 12345 as @@ gives 12000. Patterns apply only to decimal numbering systems.
new $.NumberFormat( '#,###.00' )
SpinetiX wiki source / Guide
Number of choices shown at the same time.
Details
numVisible: 3
Default 3. With the carousel size it sets the size of each choice; it should be more than 1 for most carousels.
SpinetiX wiki source / Guide
Start time of blink and nudge effects (default 0s).
Details
Used by blink and nudge.
SpinetiX wiki source / Guide
Global opacity of the layer, between 0 and 1.
Details
opacity: 0.5
Default 1. An opacity of 0 disables the layer.
$.image({ href: 'images/1.jpg', opacity: 0.5 }).addTo('svg');
SpinetiX wiki source / Guide
Orientation of the pivot line: random (default), horizontal, vertical.
Details
Used by pivotIn/pivotOut.
SpinetiX wiki source / Guide
Pivot axis of flip: random (default), horizontal, vertical.
Details
Outer radius of the bars as a ratio of the widget size.
Details
outerRadius: 0.5
Default depends on style.
SpinetiX wiki source / Guide
Duration of each page; switches scrolling to page by page and ignores lineDur.
Details
pageDur: 3
Default 1.5 x lines.
Since Firmware 3.1
SpinetiX wiki source / Guide
Callback called when the current page ends.
Details
pageEnded: function() { ... }
Default null. this is the layer. Typically used to program the next page with a switch call.
SpinetiX wiki source / Guide
Defines the motion path with a $.pathData object instead of coordinate pairs.
Details
Supports the same features as path shapes, including Bezier curves and elliptical arcs.
$.media({ href: 'media/Fusion.jpg', left: 560, top: 205, width: 160, height: 90 }).animateMotion({ dur: 10, path: new $.pathData().moveTo( 0, 0 ).arcTo( 200, 200, 0, 1, 1, -1, 0 ) }).addTo('svg');
SpinetiX wiki source / Guide
Authoring length of the path for calibration. Rarely needed.
Details
Array of 'x, y' coordinate pairs that make up the polyline.
Details
Type: Array.<String>.
SpinetiX wiki source / Guide
Array of 'x, y' coordinate pairs that make up the polygon.
Details
Type: Array.<String>.
SpinetiX wiki source / Guide
primaryOrder (table)
in $.table() # attribute jSignage In content Primary filling order of the table.
Details
primaryOrder: 'leftToRight'
'leftToRight', 'rightToLeft', 'topToBottom' or 'bottomToTop'. Default 'leftToRight', or 'topToBottom' when there is one column and several rows.
SpinetiX wiki source / Guide
Radius of the circle.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Radius of the gradient circle.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Callback that returns the SVG layer for each choice. Required.
Details
renderToSVG: function( index, item ) { ... }
Same as the slideshow renderToSVG callback: index and item.
SpinetiX wiki source / Guide
Callback that builds the layer for one data item. Required.
Details
renderToSVG: function( index, item, width, height ) { ... }
Called once per item just before it becomes visible, with index, item (also this), width and height (pixels of the crawler area). Must return a jSignage layer with absolute pixel width and height.
SpinetiX wiki source / Guide
Callback that builds the SVG layer for each slide. Required.
Details
renderToSVG: function( index, item ) { ... }
Called once per slide with index (0 to data.length-1) and item (data[index], may be undefined). Must return a jSignage layer or null to end the slideshow. The returned layer may carry gap and transition attributes that override the slideshow defaults.
renderToSVG: function() { return $.g().add([$.media({ href: this.img }), $.textArea().text(this.title)]); }
SpinetiX wiki source / Guide
Callback that renders a data item as a layer, called once per cell.
Details
renderToSVG: function( primary, secondary, item ) { ... }
Receives primary and secondary (zero-based cell coordinates in scan order) and item (also this; null when data is null). Returns a jSignage layer, or null to skip the cell. Required if data is null. Default: function() { return this; }.
renderToSVG: function( primary, secondary ) { return $.textArea({ fontSize: 32 }).text(primary + 'x' + secondary); }
SpinetiX wiki source / Guide
Callback that builds the text for a data item.
Details
renderToText: function( index, item ) { ... }
Receives index (0 to data.length-1) and item (data[index], also this). Returns a string or a $.tspan() formatted text object. Default: function( index, item ) { return this; }.
renderToText: function() { return $.tspan(this.title, { fontWeight: 'bold' }).tbreak().tspan(this.description); }
SpinetiX wiki source / Guide
Callback that builds the text for each data item.
Details
renderToText: function( index, item ) { ... }
Called once per item just before it becomes visible, with index and item (also this). Returns a string or a $.tspan() formatted text object. Default: function() { return this; }.
renderToText: function() { return this.title; }
SpinetiX wiki source / Guide
Callback that returns the URI string for each data item.
Details
renderToURI: function() { return this.image; }
Default: function() { return this; }, which treats data items as URIs.
SpinetiX wiki source / Guide
Number of times the active interval repeats. 'indefinite' loops forever.
Details
repeatCount: 'indefinite' | 3
Default: no repeat. Media such as video plays once unless repeatCount or repeatDur is set.
$.video({ href: 'clip.avi', repeatCount: 'indefinite' }).addTo('svg');
SpinetiX wiki source / Guide
Number of iterations, or 'indefinite'.
Details
| Parameter | Type | Default | Description |
repeatCount | Number | String | 1 | Number of iterations, or 'indefinite'. |
SpinetiX wiki source / Guide
Time during which the active interval repeats. 'indefinite' loops forever.
Details
repeatDur: 'indefinite' | '60s'
Default: no repeat. The media layer page recommends repeatDur: 'indefinite' for a looping video.
$.video({ href: 'clip.avi', repeatDur: 'indefinite' }).addTo('svg');
SpinetiX wiki source / Guide
Total time to repeat the animation, or 'indefinite'.
Details
| Parameter | Type | Default | Description |
repeatDur | Number | String | | Total time to repeat the animation, or 'indefinite'. |
SpinetiX wiki source / Guide
Interval between repeats of blink and nudge (default 1s).
Details
Used by blink and nudge.
SpinetiX wiki source / Guide
Position of the right side of the layer relative to the right side of its parent layer.
Details
right: '0%'
Absolute or relative value. Default 'auto'.
$.image({ href: 'images/top.jpg', width: '20%', height: '20%', top: '5%', right: '0%' }).addTo('svg');
SpinetiX wiki source / Guide
Rotates the layer along the motion: degrees, 'auto' or 'auto-reverse'.
Details
Extra padding between rows, in pixels or percent of the table height.
Details
rowPadding: 10
Default 0.
SpinetiX wiki source / Guide
Number of rows, or an array of row heights.
Details
X radius of the ellipse that rounds the corners; if only one radius is given, the other equals it.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
X radius.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Y radius of the ellipse that rounds the corners; if only one radius is given, the other equals it.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Y radius.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
How a too-large text is reduced: 'squeeze' or 'uniform'.
Details
scaleMethod: 'squeeze' | 'uniform'
Default 'squeeze' squeezes the text horizontally. 'uniform' reduces the font size and centres the text vertically.
$.headlineTextArea({ scaleMethod: 'uniform' }).text('Fit this text.').addTo('svg');
SpinetiX wiki source / Guide
If true the text scrolls back to the start using backSpeed; if false it jumps back after backDelay.
Details
scrollBack: true
Default false.
SpinetiX wiki source / Guide
Duration of one scroll step in seconds.
Details
scrollDur: 0.5
Default 0.5.
SpinetiX wiki source / Guide
Duration of one scroll step in seconds.
Details
scrollDur: 0.5
Default 0.5.
SpinetiX wiki source / Guide
secondaryDelay (table)
in $.table() # attribute jSignage In content Extra delay between the start times of each secondary series.
Details
secondaryDelay: 0.5
Default 0.
SpinetiX wiki source / Guide
secondaryOrder (table)
in $.table() # attribute jSignage In content Secondary filling order of the table.
Details
secondaryOrder: 'topToBottom'
'leftToRight', 'rightToLeft', 'topToBottom' or 'bottomToTop'. Default 'topToBottom' if the primary order is horizontal, 'leftToRight' otherwise.
SpinetiX wiki source / Guide
Shape fill and stroke attributes
# property jSignage In content Fill and stroke attributes common to all shape constructors.
Details
Accepted by $.path(), $.rect(), $.circle(), $.ellipse(), $.line(), $.polyline() and $.polygon(). A line has no interior, so fill never applies to it.
$.rect({ x: 200, y: 100, width: 600, height: 400, fill: 'blue', stroke: 'red', strokeWidth: 5 }).addTo('svg');
Notes Effects, custom animations and frame decoration cannot be applied to a shape directly. Add the shape to a layer, typically a group, and apply them to that layer.
Related $.path(), $.rect(), $.circle(), $.ellipse(), $.line(), $.polyline(), $.polygon()
SpinetiX wiki source / Guide
Rounds the speed to the nearest value that gives a smooth crawl.
Details
smooth: true
Default true.
SpinetiX wiki source / Guide
Rounds the speed to the nearest value that gives a smooth crawl.
Details
smooth: true
Default true.
SpinetiX wiki source / Guide
Rounds the speed so the text always moves by the same whole number of screen pixels per second.
Details
smooth: true
Default true.
SpinetiX wiki source / Guide
Rounds the speed to the nearest value that gives smooth scrolling.
Details
smooth: true
Default true.
SpinetiX wiki source / Guide
Empty space between two choices, in percent.
Details
spacing: '10%'
Default '10%'.
SpinetiX wiki source / Guide
Space between two items, in percent of the line size.
Details
spacing: 20
Default 20.
SpinetiX wiki source / Guide
Space between two items, in percent of the line size.
Details
spacing: 20
Default 20.
SpinetiX wiki source / Guide
Space between two items, in percent of the line size.
Details
spacing: 50
Default 50.
SpinetiX wiki source / Guide
Crawling speed in percent.
Details
speed: 100
100 is one layer height per second (one half of the width for vertical crawlers). Default 100.
SpinetiX wiki source / Guide
Crawling speed in percent.
Details
speed: 100
100 is one layer height per second (one half of the width for vertical crawlers). Default 100.
SpinetiX wiki source / Guide
Scrolling speed in percent of the area height per second.
Details
speed: 100
Default 100: the text scrolls by the height of the area every second.
SpinetiX wiki source / Guide
Scrolling speed in percent; 100 is one line height per second.
Details
speed: 200
Default 100.
SpinetiX wiki source / Guide
spx:effect-target-id
# attribute jSignage In content SVG attribute that marks a g element as an effect wrapper and points to the wrapped layer id.
Details
Required for the jSignage API to recognize an effect. When several effects are applied they chain through this attribute.
<g xml:id='fadein' spx:effect-target-id='media'>
<animate attributeName='opacity' from='0' to='1' dur='1' begin='media.begin'/>
<video xml:id='media' href='clip.mp4' width='160' height='90' begin='0'/>
</g>
Related .effectIn(), .effectOut()
SpinetiX wiki source / Guide
Array of gradient stops, each with offset, color and opacity.
Details
Type: Array.<Plain Object>.
SpinetiX wiki source / Guide
Array of gradient stops, each with offset, color and opacity.
Details
Type: Array.<Plain Object>.
SpinetiX wiki source / Guide
stops[].color
in stops # attribute jSignage In content Color at the stop.
Details
Type: Color. Default: 'black'.
SpinetiX wiki source / Guide
stops[].color
in stops # attribute jSignage In content Color at the stop.
Details
Type: Color. Default: black.
SpinetiX wiki source / Guide
stops[].offset
in stops # attribute jSignage In content Position of the stop along the vector, 0 to 1.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
stops[].offset
in stops # attribute jSignage In content Position of the stop, 0 to 1.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
stops[].opacity
in stops # attribute jSignage In content Opacity at the stop.
Details
Type: Number. Default: 1.
SpinetiX wiki source / Guide
stops[].opacity
in stops # attribute jSignage In content Opacity at the stop.
Details
Type: Number. Default: 1.
SpinetiX wiki source / Guide
Outline paint: 'none', a solid color or a gradient reference.
Details
Type: Paint. Default: 'none'.
SpinetiX wiki source / Guide
Dash and gap lengths separated by commas, for example '5,3,2,5,3,2'; 'none' for a solid line.
Details
Type: String. Default: 'none'.
SpinetiX wiki source / Guide
Distance into the dash pattern where the dash starts; may be negative.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Shape at the ends of open sub-paths: 'butt', 'round' or 'square'.
Details
Type: String. Default: 'butt'.
SpinetiX wiki source / Guide
Shape at corners: 'miter', 'round' or 'bevel'.
Details
Type: String. Default: 'miter'.
SpinetiX wiki source / Guide
Limit on miter length to stroke width ratio when strokeLineJoin is 'miter'.
Details
Type: Number. Default: 4.
SpinetiX wiki source / Guide
Opacity of the outline, 0.0 to 1.0.
Details
Type: Number. Default: 1.
SpinetiX wiki source / Guide
Outline width in pixels; 0 paints no stroke.
Details
Type: Number. Default: 1.
SpinetiX wiki source / Guide
Bar style: 'manzana', 'square' or 'round'.
Details
style: 'round'
Default $.uiStyle.
SpinetiX wiki source / Guide
Wheel style: 'manzana', 'square' or 'round'.
Details
style: 'manzana'
Default 'manzana'.
SpinetiX wiki source / Guide
Button style: 'square', 'round' or 'manzana'.
Details
style: 'round'
Default $.uiStyle.
SpinetiX wiki source / Guide
Wipe subtype; the allowed values depend on the wipe type.
Details
bar: leftToRight, rightToLeft, topToBottom, bottomToTop. box: topLeft, topRight, bottomRight, bottomLeft, topCenter, rightCenter, bottomCenter, leftCenter. barnDoor: vertical, horizontal. iris: rectangle. Default is random for bar, box and barnDoor.
SpinetiX wiki source / Guide
Wipe subtype: depends on type; random is the default for bar, box and barnDoor.
Details
Horizontal alignment of the text inside a text area.
Details
textAlign: 'center' | 'start' | 'end' | 'justify'
'center', 'start', 'end' or 'justify'. Default 'center'. 'start' is left in left-to-right documents and right in right-to-left ones; 'end' is the opposite. Text area level only.
$.textArea({ textAlign: 'start' }).text('Left').addTo('svg');
SpinetiX wiki source / Guide
Horizontal alignment of the text.
Details
textAlign: 'center'
'start' (default), 'center', 'end' or 'justify'. 'justify' is valid for 'topToBottom' and 'bottomToTop' only.
SpinetiX wiki source / Guide
Colour of the text border.
Details
textBorderColor: 'black'
Default black.
Since Firmware 3.1
SpinetiX wiki source / Guide
Width of the text border, drawn along the outline of each character.
Details
textBorderSize: 2
Default 0.
Since Firmware 3.1
SpinetiX wiki source / Guide
Linear gradient paint for the text. Overrides fill.
Details
textFillGradient: 'linear-gradient(to bottom, yellow, blue)'
Value is a CSS3 linear-gradient() description.
$.textArea({ fontSize: 80, textFillGradient: 'linear-gradient(to bottom, yellow, blue)' }).text('Gradient').addTo('svg');
Since Firmware 3.1
SpinetiX wiki source / Guide
Text shadow in CSS3 syntax.
Details
textShadow: '2px 2px black'
Example value: '2px 2px black'.
$.textArea({ fontSize: 80, textShadow: '2px 2px black' }).text('Shadow').addTo('svg');
Since Firmware 3.1
SpinetiX wiki source / Guide
End value of the animation. Ignored if values is set.
Details
| Parameter | Type | Default | Description |
to | Number | String | | End value of the animation. Ignored if values is set. |
SpinetiX wiki source / Guide
Position of the top of the layer relative to the top of its parent layer.
Details
top: '80%'
Absolute or relative value. Default 'auto'.
$.textArea({ top: '80%', height: '15%' }).text('Welcome').addTo('svg');
SpinetiX wiki source / Guide
Rotates or flips the content of the layer with one or more named transforms.
Details
transform: 'flipHorizontal rotateRight'
Space-separated list of flipHorizontal, flipVertical, rotateLeft (90 degrees left) and rotateRight (90 degrees right). Each is applied in turn. After the layer is in the DOM, raw SVG transforms (matrix, translate, scale, rotate, skewX, skewY) can be appended to the existing transform value, which also holds the layer position as a translate. Default: none.
$.image({ id: 'img3', href: 'resto.png', transform: 'flipHorizontal rotateRight' }).addTo('svg');
Notes On HMP350, HMP300 or older, apply complex transforms to semi-static content (images, text) and avoid them on videos and SVG animations.
SpinetiX wiki source / Guide
Slide-specific transition. Set on the layer returned by renderToSVG.
Details
return $.g({ transition: $.crossFade() })
Overrides defaultTransition for that slide.
SpinetiX wiki source / Guide
Transition between items.
Details
transition: $.push({ direction: 'bottomToTop' })
Default $.push({ direction: 'bottomToTop' }).
SpinetiX wiki source / Guide
Wipe type per SMPTE 258M-1993: random (default), bar, box, barnDoor, iris.
Details
Used by wipeIn/wipeOut.
SpinetiX wiki source / Guide
Wipe type per SMPTE 258M-1993: random (default), bar, box, barnDoor, iris.
Details
Carousel type.
Details
type: 'strip' | 'wheel' | 'roller' | 'squeeze' | 'electron'
'strip' (default), 'wheel', 'roller', 'squeeze' or 'electron'.
SpinetiX wiki source / Guide
Controls the Unicode bidirectional text layout algorithm.
Details
unicodeBidi: 'embed'
CSS unicode-bidi property.
SpinetiX wiki source / Guide
Successive values of the animated target.
Details
Array for animate functions, semicolon-separated string for svgAnimation(). Type depends on the function: colors, opacity, x,y pairs, zoom factors. Give values, or from and to, or by, never a mix. With overlapping animations on one target, the one that started last wins; on a tie, the one specified last.
| Parameter | Type | Default | Description |
values | Array | String | | Successive values of the animated target. |
SpinetiX wiki source / Guide
Defines a new coordinate space inside the layer area.
Details
viewBox: '0 0 100 100' | 'none'
Syntax 'x y width height' or 'none'. Default 'none': the layer inherits the parent coordinate space shifted so that (0,0) is its top left corner. Typically used on $.g() layers that hold geometric shapes.
$.g({ width: 400, height: 300, viewBox: '0 0 100 100' }).addTo('svg');
SpinetiX wiki source / Guide
Absolute or relative width of the layer.
Details
width: '50%'
Default 'auto'.
$.video({ href: 'clip.mp4', width: '50%', height: '50%' }).addTo('svg');
SpinetiX wiki source / Guide
Width of the rectangle.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Callback that builds extra SVG for the exit effect on the previous, frozen slide (default null).
Details
callback( trigger, inner, width, height, left, top, bbw, bbh ). this is the g element wrapping the slide. trigger is the begin event string; inner is the next element in the effect stack; width/height is the layer size; left/top its position in the parent; bbw/bbh the parent size, in pixels. It runs when the next slide is created.
SpinetiX wiki source / Guide
Callback that builds extra SVG for the in effect; the slide is wrapped in a g element (default null).
Details
callback( trigger, inner, width, height, left, top, bbw, bbh ). this is the g element wrapping the slide. trigger is the begin event string; inner is the next element in the effect stack; width/height is the layer size; left/top its position in the parent; bbw/bbh the parent size, in pixels.
SpinetiX wiki source / Guide
Callback that builds extra SVG for the out effect; the slide is wrapped in a g element (default null).
Details
callback( trigger, inner, width, height, left, top, bbw, bbh ). this is the g element wrapping the slide. trigger is the begin event string; inner is the next element in the effect stack; width/height is the layer size; left/top its position in the parent; bbw/bbh the parent size, in pixels. trigger is relative to the end of the current slide.
SpinetiX wiki source / Guide
X coordinate of the top-left corner.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
X coordinate of the start of the line.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
X coordinate of the start of the gradient vector.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
X coordinate of the end of the line.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
X coordinate of the end of the gradient vector.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Y coordinate of the top-left corner.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Y coordinate of the start of the line.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Y coordinate of the start of the gradient vector.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Y coordinate of the end of the line.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide
Y coordinate of the end of the gradient vector.
Details
Type: Number. Default: 0.
SpinetiX wiki source / Guide