Disable auto play on JSSOR Full Width Slider - jssor

I've tried
$AutoPlay: false,
in
var options = {
is there something I must delete ?

Please just replace $AutoPlay: true with $AutoPlay: false
var options = {
$FillMode: 2,
$AutoPlay: false,
$Idle: 4000,
$ArrowKeyNavigation: true,
$SlideEasing: $Jease$.$OutQuint,
$SlideDuration: 800,
};

Related

Number of rows selected banner hides export icon in MTableToolbar

I'm using #material-table/core version 0.2.32. Here is my option prop of the MaterialTable.
options={{
toolbarButtonAlignment: "left",
showTextRowsSelected: true,
search: false,
paging: false,
showTitle: false,
toolbar: true,
selection: true,
exportAllData: false,
exportMenu: [
{
label: t("Alarms.Export.CSV"),
exportFunc: (cols, renderedData, tableData) =>
ExportCsv(cols, tableData.filteredData, t("Alarms")),
},
{
label: t("Alarms.Export.PDF"),
exportFunc: (cols, renderedData, tableData) =>
ExportPdf(cols, tableData.filteredData, t("Alarms")),
},
],
}}
The select rows banner overlaps/hides the export icon in the toolbar. Same behavior with custom ToolBar component too. I can't find the class of the selected rows banner to apply custom styling too. Any workaround would be of great help.

OnChange not reading attribute

I have this
tinyMCE.init({
// General options
selector: 'textarea',
forced_root_block: "",
theme: "silver",
paste_text_sticky: true,
paste_text_sticky_default: true,
plugins: "paste,autolink,contextmenu,fullscreen,nonbreaking,template",
//plugins: "wordcount,paste,autolink,advlink,fullscreen,nonbreaking,template,inlinepopups,style",
// Theme options
//theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,undo,redo,|,justifyleft,justifycenter,justifyfull,|,link,unlink,|,fullscreen",
//theme_advanced_buttons2: "cut,copy,paste,|,cleanup,removeformat,|,bullist,numlist,outdent,indent,hr,charmap",
//theme_advanced_buttons1: "cut,copy,paste,removeformat,|,undo,redo,|,bullist,numlist,outdent,indent,|,formatselect,bold,italic,underline,forecolor,backcolor,|,justifyleft,justifycenter,justifyfull,|,link,unlink,|,fullscreen",
theme_advanced_buttons1: "cut,copy,paste,removeformat,|,undo,redo,|,bullist,numlist,outdent,indent,|,bold,italic,underline,|,fullscreen",
//theme_advanced_blockformats: 'p,h1,h2,h4,h4,h5,h6',
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
//theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing: true,
theme_advanced_path: false,
// Example content CSS (should be your site CSS)
selector: "textarea",
content_css: "/css/admin.css",
setup : function (ed) {
ed.on('click', function () {
new_value = tinymce.activeEditor.getContent()
alert(new_value);
new_value = new_value.replace(/,/g, "☀");
alert(tinymce.DOM.getAttrib(ed,"data-hidden"));
hidden_Field = tinymce.DOM.getAttrib(ed,"data-hidden");
$("#" + hidden_Field).val(new_value);
});
},
});
How do I get the value of the data-hidden attribute of the textarea that was filled in. tinymce.DOM.getAttrib(ed,"data-hidden"); isn't find anything as hidden_Field is, set when I do the alert. I am guessing Tinymce is ignoring it but how do I stop it from ignoring the attributeo
Thanks

Find index of all true inside massive

I've an array of booleans there are 10 trues and falses and I want to know the index of all trues
var trueAndFalses = [false, false, true, false, false, false, true, false, false, false]
I tried firstIndex but it only returns the firstIndex ( yes kinda ironic ). now I wonder is there any built in functions to find all the indexes of true
print(trueAndFalses.firstIndex(of: true))
any solution will be appericated <3
You can try to find all index by visiting all elements and checking if its true like below:
var trueAndFalses = [false, false, true, false, false, false, true, false, false, false]
for var i in (0..<trueAndFalses.count){
if (trueAndFalses[i] == true)
{
print("true fount at index ",i)
}
}
Output:
true fount at index 2
true fount at index 6
Other way:
let indices = trueAndFalses.enumerated().compactMap { $1 == true ? $0 : nil }
print(indices)
Output:
[2, 6]

Echartjs disable datazoom slider on y-axis (gantt)

is there a way to disable the data zoom option on the axis (y-axis) in my case. As you can see from the screenshot there is the motion which I would like to disable. The scrollbar on the y-axis should just execute the scrolling and not th zooming:
Gantt Chart Screenshot
This is the json declaration for the datazoom option:
type: 'slider', // horizontal scrollbar
xAxisIndex: 0,
filterMode: 'weakFilter',
height: 17,
bottom: 0,
start: 0,
//end: 26,
end: 100,
handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '80%',
showDetail: true,
backgroundColor: sliderBgColor,
fillerColor: sliderColor,
handleStyle: {
color: sliderHandleColor
}
}, {
type: 'inside', // horizontal mouse gestures
id: 'insideX',
xAxisIndex: 0,
filterMode: 'weakFilter',
start: 0,
end: 26,
zoomOnMouseWheel: false,
moveOnMouseMove: true,
moveOnMouseWheel: false
}, {
type: 'slider', // vertical scrollbar
yAxisIndex: 0,
zoomLock: true,
width: 20,
right: 0,
top: 30,
bottom: 20,
show: _rawData.ganttRows.data.length > noOfRows,
start: 0, // this defines the height of each line indirectly
end: Math.min(100, noOfRows * 100 / _rawData.ganttRows.data.length),
showDetail: false,
backgroundColor: sliderBgColor,
fillerColor: sliderColor,
zoomOnMouseWheel: false,
moveOnMouseMove: true,
moveOnMouseWheel: true,
}, {
type: 'inside', // vertical mouse gestures
id: 'insideY',
yAxisIndex: 0,
start: 95,
end: 100,
zoomOnMouseWheel: false,
moveOnMouseMove: true,
moveOnMouseWheel: true // move up and down with mouse wheel
}],
Just add the option brushSelect in your slider:
type: 'slider',
...
brushSelect: false,

How to "fix zoom function" error in balkangraph orgchart?

When I initialize the balkan orgchart. Its fit on screen but i need to zoom out when its initialize. But its throwing error when i call zoom function with chart variable which i mentioned in code.
chart.zoom(0.5)
var chart = new OrgChart(document.getElementById("tree"), {
template: "rony",
nodeMouseClick: OrgChart.action.none,
mouseScrool: OrgChart.action.zoom,
align: OrgChart.ORIENTATION,
enableSearch: false,
showXScroll: OrgChart.none,
toolbar: {
zoom: true,
fit: true,
expandAll: false
},
collapse: {
level: 2,
allChildren: true
},
nodeBinding: {
field_0: "name",
field_1: "title",
field_2: "department",
img_0: "img",
field_number_children: "field_number_children"
},
nodes: nodes
});
I expect the output to zoom out the chart when its initialize.
Use scaleInitial option:
var chart = new OrgChart(document.getElementById("tree"), {
scaleInitial: 0.5
});