I got a problem with Jssor Slider in IE 7, console shows following error:
Jssor.Slider.min.js, Line 2 character 8364.
Property GetComputedStyle is null or not define
JS Code:
if (data.url == 'pdf' || data.url == 'articulo'){
var isiPad = navigator.userAgent.match(/iPad/i) != null;
var drag = 0;
if (isiPad == true || document.getElementById('index-movil')){
drag = 1;
}
var options = {
$DragOrientation: drag, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
$Loop: false,
$ArrowNavigatorOptions: { //[Optional] Options to specify and enable arrow navigator or not
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
$AutoCenter: 0, //[Optional] Auto center arrows in parent container, 0 No, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
$Steps: 1 //[Optional] Steps to go for each navigation request, default value is 1
}
};
var jssor_slider1 = new $JssorSlider$("slider1_container", options);}
Chrome, Firefox and Safari working perfectly
Thanks...
I tested your code, it works OK. Maybe you are not using the latest version.
Btw, you can set $Loop to 0 instead of false.
$Loop: Enable loop(circular) of carousel or not, 0: stop, 1: loop, 2 rewind, default value is 1
Reference: http://www.jssor.com/development/reference-options.html
I've get fix my problem, in jssor.slider.min.js (only works at less IE9) I've changed GetComputedStyle to currentStyle.
Related
I have a C program written on MINGW. It creates 2 windows and then associates them with 2 panels as follows.
ptr_wpaint = newwin(paint_row_max, paint_col_max, 5, 5);
ptr_wform = newwin(form_row, form_col, 10, 10);
clearok(ptr_wpaint, FALSE);
immedok(ptr_wpaint, FALSE);
leaveok(ptr_wpaint, FALSE );
clearok(ptr_wform, FALSE);
immedok(ptr_wform, FALSE);
leaveok(ptr_wform, FALSE );
curs_set(1);
mvwprintw(ptr_wpaint,1,1, "Paint window at 1,1 ");
mvwprintw(ptr_wform ,1,1, "Form window at 1,1 ");
wmove(ptr_wpaint, 1, 1);
wmove(ptr_wform , 1, 1);
wnoutrefresh(ptr_wpaint);
wnoutrefresh(ptr_wform);
update_panels();
doupdate();
however the cursor remains at position 0,0 in the stdscr which is outside of the current window.
how do I position the cursor in each window ?
I can post the complete code if that would be helpful. I assume that it would be best to put the code on my google drive and then post a link to it.
if there is better way to share the code, please let me know.
The issue was that I needed to add the following statement
leaveok(stdscr, TRUE );
before creating the other windows. After that it appears to be working.
I'm working on Xcode 8 and Swift 3.
So far I have connected a button with a label. The label is set at 0 and by clicking it, it will change the number by 1.
Now what I'm trying to do is I want to set an array of images to be displayed after clicking it.
So image 1 shown at 0 then image 2 shown once the button is clicked 1-10 times,
then image 3 shown after button is clicked 20-30 times,
then image 4 is shown after 30-40 clicks/taps of the button.
Also the other images are hidden time the respected number of clicks.
Here's a pseudo code for array of JPEGs:
var arrayOfPictures: [UIImage] = []
arrayOfPictures.append(UIImage(named:"Image1.jpg")!)
arrayOfPictures.append(UIImage(named:"Image2.jpg")!)
arrayOfPictures.append(UIImage(named:"Image3.jpg")!)
Here's a pseudo code for button's method:
var counter: Int = 0
#IBAction func showPicture(sender: AnyObject?) {
counter += 1
if counter == 0 {
arrayOfPictures[0]
}
else if counter >= 1 && counter <= 10 {
arrayOfPictures[1]
}
else if counter >= 11 && counter <= 20 {
arrayOfPictures[2]
}
else if ....................
............................
}
I use angular-nvd3 library in my angular project.
I need to change column width in "multiBarChart". I tried to change on event "on-ready" but it doesn't work
onChartReady(scope, element) {
const api = scope.api;
const chart = scope.chart;
const svg = scope.svg;
var bars = svg.selectAll("rect.nv-bar");
bars.attr("width", "200");
}
You can use the below code snippet to change the width of the bar in multi bar chart.
groupSpacing property accepts a value between 0 and 1
A value of 0.1 will make the bars very wide. A value of 0.9 will make them narrow.
chart.groupSpacing(0.8); // Value must be between 0 & 1
Been researching but no luck. Creating a button on Corona SDK requires several lines. (Corona SDK reference here). If you create 5 buttons the code grows a lot, so I created a function that I can call with just one liner and creates the buttons I need. It works fine but can't sort the events.
cbutton = function (nbutton, tbutton, blabel, bfs, bx, by)
bfcolor={default = { 51, 51, 51, 215 }}
if tbutton == "default-1" or tbutton == "default-2" or tbutton == "default-3" then bfcolor = nil end
local button1 = widget.newButton
{
defaultFile = "assets/" .. tbutton .. ".png",
overFile = "assets/o" .. tbutton .. ".png",
label = blabel,
labelColor = bfcolor,
fontSize = bfs,
emboss = true,
onPress=botonhrPress // <-- HERE, THIS PART
}
button1.x = bx; button1.y = by
end
cbutton("b1","primary-1","Create account", 20, 160, 160)
So, here is the thing.
The code above works, it creates the button.
Using the last line, calls the function and creates the button
It used the parameters
The part that says "HERE" works, ties the event to the button
BUT, it's directly written, can't pass parameters there
Tried concatenation, a full string variable with the name of the local function, also %, &, () and {} to enclose the data, no luck. If we can work around this part then we could create buttons with just one line of code + the function posted here. Any ideas will be appreciated, thanks in advance.
Feeling I had not enough control over the chart if I had used a grouped column chart, I made my own version by just adding different series to the chart. After all the store, the number of series, their colors and such all need to be set dynamically and not hard coded. So basically this is what I have:
chart = Ext.create("Ext.chart.Chart", {
store: dataStore,
axes: dynamicAxes,
series: series
});
I leave out the not interesting stuff such as width, height of the chart etc.
now I have a method whichs returns a series object. This is added to the series array mentioned in the code above. The function has a "item" object parameter and also an idx param which is the index of the item object from the array it comes from, and a max param which is the size of the item array
the function returns something like this:
var w = (typeof (max) !== "undefined" && max !== null) ? this._getWidthByMax(max) : 30;
return {
type: "column",
axis = "left",
xField = "timestamp",
yField = item.id, // store field name equals the id of the item object
style = { stroke: colorCode, "stroke-width": (item.isDefault) ? 2 : 1, fill: colorCode },
width = w,
renderer = function (sprite, rec, attr, bix) {
var nx = idx * w;
return Ext.apply(attr, { translation: { x: nx} });
}
}
now this works fine for the number of columns I want to have. That can be one, two, three... up to seven currently.
However, if I want to hide a series, the following call doesn't work:
chart.series.getAt(idx).hideAll();
while it does work if I render my chart as a line chart.
is this a bug in Ext-js 4 or is it because of how I rendered the series for my column chart?
since nobody has replied to my question and I have found a solution in the meantime, I might as well answer my own question...
the problem occurred in Ext Js 4.0.7.
With version 4.1 RC 2 the hideAll behaved correctly.
So the solution, for anyone who would have the same problem, is to upgrade to 4.1 RC 2 or newer.