sIFR multiple calls don't work :( - sifr

I'm trying to use sIFR on my menu and on my headers... but only one call works... the others that I put after never appear :(...
Can somebody help me ?
Note : I'm using the r436 and below is my code ...
var segoe = {
src: 'pathto/segoe.swf',
ratios: [7, 1.58, 8, 1.49, 10, 1.5, 11, 1.45, 16, 1.46, 21, 1.44, 22, 1.41, 27, 1.42, 30, 1.41, 32, 1.4, 35, 1.41, 36, 1.4, 38, 1.39, 41, 1.4, 58, 1.39, 65, 1.38, 66, 1.39, 102, 1.38, 104, 1.37, 106, 1.38, 107, 1.37, 108, 1.38, 109, 1.37, 110, 1.38, 112, 1.37, 114, 1.38, 120, 1.37, 121, 1.38, 1.37]
};
sIFR.activate(segoe);
sIFR.replace(segoe, {
selector: '#header ul li a span.title',
css: ['.sIFR-root { text-align: center; font-size:13px; letter-spacing:2; font-weight: bold; text-transform:uppercase; cursor: pointer; color:#FFFFFF; background-color:#0C2C39; margin:0 3px; }'],
wmode: 'transparent'
});
sIFR.replace(segoe, {
selector: 'h1',
css: ['.sIFR-root { text-align: center; font-size:13px; letter-spacing:2; font-weight: bold; text-transform:uppercase; cursor: pointer; color:#000; background-color:#fff; margin:0 3px; }']
});

Okay I feel stupid now...
I wasn't properly calling the "sifr-config.js" file...
-_-"
Sorry !

Related

Image rounding on Android but not on iOS

Edit 3: What worked for me
<View
style={{
minHeight: 200
}}
>
<Image
resizeMode="contain"
source={{ uri: props.item.thumbnailURL }}
style={{
flex: 1,
width: 350,
height: 200,
borderBottomLeftRadius: 30,
borderBottomRightRadius: 30,
borderTopLeftRadius: 30,
borderTopRightRadius: 30,
borderColor: "orange",
borderWidth: 1,
overflow: "hidden",
flexDirection: "row",
alignSelf: "center",
}}
/>
</View>
Edit 2: Added full code
Edit: I added
borderWidth: 3, borderColor: "orange"
and noticed that the parent of the image is rounding screenshot ... But why? I didn't want that.
I also tried with
borderRadius: Platform.OS === "ios" ? 30/2 : 30 but it didn't have any effect. What more can I do?
You must specify border radius value for all of the corners for ios
for example:
{
flex: 1,
width: 350,
height: 200,
borderRadius:30,
overflow: "hidden",
borderBottomLeftRadius: 30,
borderBottomRightRadius: 30,
borderTopLeftRadius: 30,
borderTopRightRadius: 30,
}

iOS Safari 13.X no longer styling scroll bars

I have a web app that draws lots of overflowed canvases with windows styled scroll bars.
Previously on iOS 12.X this worked fine and we had 17px scroll bars being overlayed, this behaviour still works-on Android Chrome, and all desktop browsers.
Here's a JS fiddle of a "typical" item we have https://jsfiddle.net/wf80rp5g/4/
css for it
.VTSOuterDiv {
width: 400px;
height: 400px;
overflow: auto;
}
::-webkit-scrollbar {
-webkit-appearance: none;
width: 17px;
height: 17px;
overflow: scroll;
}
::-webkit-scrollbar-track {
/* This color is also used by WIN_NODE's setCanvasSize method, so if we change this
then we should update that. */
background-color: rgb(240, 240, 240);
}
::-webkit-scrollbar-thumb {
background-color: rgb(205, 205, 205);
min-width: 10px;
min-height: 10px;
}
::-webkit-scrollbar-button {
display: normal;
background-color: rgb(240, 240, 240);
background-repeat: no-repeat;
background-position: center;
width: 17px;
height: 17px;
}
::-webkit-scrollbar-thumb:hover {
background-color: rgb(170, 170, 170);
}
::-webkit-scrollbar-thumb:active {
background-color: rgb(141, 141, 141);
}
::-webkit-scrollbar-button:hover {
background-color: rgb(170, 170, 170);
}
::-webkit-scrollbar-button:active {
background-color: rgb(141, 141, 141);
}
On desktop browser there's scroll bars, on chrome mobile and older safari there's scroll bars, but on 13.X we no longer get stylized scroll bars.
is there any known work arounds for this? the release notes aren't forth coming about this change.

Highcharts: stacked bar charts tooltip enable shared and keep display arrow

When I enable tooltip.shared = true, The arrow will disappear like screen shot.
tooltip: {
shared: true
},
I want to keep arrow just like tooltip.shared = false
tooltip: {
shared: false
},
DEMO in here http://jsfiddle.net/puff0211/5sbfztur/
Does anyone know to accomplish this?
Thank you!
You can prevent from skipping the tooltip anchor in case tooltip is shared by wrapping move function. More about wrapping can be here: https://www.highcharts.com/docs/extending-highcharts/extending-highcharts. Take a look at the example below.
DOCS Reference:
https://www.highcharts.com/docs/extending-highcharts/extending-highcharts
Example:
http://jsfiddle.net/u6d2bode/
You can use tooltip.formatter with some css to achieve nearly required behavior but not exactly same when shared: false .
$(document).ready(function() {
$('#container').highcharts({
chart: {
//type: 'column'
type: 'bar'
},
title: {
text: 'Stacked column chart'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
yAxis: {
min: 0,
title: {
text: 'Total fruit consumption'
},
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
},
legend: {
align: 'right',
x: -100,
verticalAlign: 'top',
y: 20,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
borderColor: '#CCC',
borderWidth: 1,
shadow: false
},
tooltip: {
shared: true,
useHTML: true,
backgroundColor: null,
borderWidth: 0,
formatter: function() {
//console.log(this.points)
var points = this.points;
var pointsLength = points.length;
var tooltipMarkup = pointsLength ? '<div class="callout right" >' + points[0].key + '<br/>' : '';
var index;
var y_value;
for (index = 0; index < pointsLength; index += 1) {
y_value = (points[index].y);
tooltipMarkup += '<span style="color:' + points[index].series.color + '">\u25CF</span> ' + points[index].series.name + ': <b>' + y_value + ' </b><br/>';
}
return tooltipMarkup + '</div>';
},
/*//you can use bellow code to adjust position
positioner: function(boxWidth, boxHeight, point) {
return {x:point.plotX,y:point.plotY};
}*/
},
plotOptions: {
series: {
stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
}
}
},
series: [{
name: 'John',
data: [5, 3, 4, 7, 2]
}, {
name: 'Jane',
data: [2, 2, 3, 2, 1]
}, {
name: 'Joe',
data: [3, 4, 4, 2, 5]
}]
});
});
div.callout {
background-color: rgba(247, 247, 247, 0.85);
background-image: -moz-linear-gradient(top, rgba(247, 247, 247, 0.85), rgba(247, 247, 247, 0.85));
position: relative;
color: #000;
padding: 5px;
border-radius: 3px;
box-shadow: 0px 0px 20px #444;
}
.callout::before {
content: "";
width: 0px;
height: 0px;
border: 0.8em solid transparent;
position: absolute;
}
.callout.right::before {
left: -20px;
top: 35%;
border-right: 10px solid rgba(247, 247, 247, 0.85);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
Fiddle demo
tooltip formatter
tooltip: {
shared: true,
useHTML: true,
backgroundColor: null,
borderWidth: 0,
formatter: function() {
var points = this.points;
var pointsLength = points.length;
var tooltipMarkup = pointsLength ? '<div class="callout right" >' + points[0].key + '<br/>' : '';
var index;
var y_value;
for (index = 0; index < pointsLength; index += 1) {
y_value = (points[index].y);
tooltipMarkup += '<span style="color:' + points[index].series.color + '">\u25CF</span> ' + points[index].series.name + ': <b>' + y_value + ' </b><br/>';
}
return tooltipMarkup + '</div>';
},
css
div.callout {
background-color: rgba(247, 247, 247, 0.85);
background-image: -moz-linear-gradient(top, rgba(247, 247, 247, 0.85), rgba(247, 247, 247, 0.85));
position: relative;
color: #000;
padding: 5px;
border-radius: 3px;
box-shadow: 0px 0px 20px #444;
}
.callout::before {
content: "";
width: 0px;
height: 0px;
border: 0.8em solid transparent;
position: absolute;
}
.callout.right::before {
left: -20px;
top: 35%;
border-right: 10px solid rgba(247, 247, 247, 0.85);
}

Is it possible to make custom shaped label w/o use of html in highcharts?

I have animated moving label
plotbandLabel.animate({
y : yAxis.toPixels(y) - labelOffset
}, {
duration : 500,
step : function () {
this.attr({
text : yAxis.toValue(this.y + labelOffset).toFixed(2),
zIndex : 999999999
})
},
complete : function () {
this.attr({
text : y.toFixed(2),
zIndex : 999999999
})
}
});
Here is the full example: http://jsfiddle.net/7yo3nht4/
And I need this label to be shaped like an arrow:
If you omit fill property in renderer.label the label's box won't be created:
plotbandLabel = this.renderer.label(
(...)
)
.css({
(...)
}).attr({
(...)
//fill: 'red' // no fill
})
.add();
Then you can create a custom path and append it to the plotbandLabel SVG group:
this.renderer.path(['m', -10, 15, 'l', 15, -15, 'l', 50, 0, 'l', 0, 30, 'l', -50, 0, 'l', -15, -15, 'z']).attr({
fill: 'rgba(0, 0, 0, 0.75)'
}).add(plotbandLabel);
Live demo: http://jsfiddle.net/kkulig/hqyfpsw4/
API reference: https://api.highcharts.com/class-reference/Highcharts.SVGRenderer#path
The label renderer has this form:
label: function (str, x, y, shape, anchorX, anchorY, useHTML, baseline, className)
So if useHTML=true the string could be an HTML string like this:
var txt = '<div class="arrow_box">'+(66).toFixed(2)+'</div>';
and applying a proper CSS:
.arrow_box {
color: #FFFFFF;
position: relative;
background: rgba(0, 0, 0, 0.75);
border: 0px;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
width: 50px;
}
.arrow_box:after, .arrow_box:before {
right: 100%;
top: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.arrow_box:after {
border-color: rgba(255, 0, 0, 0)
border-right-color: rgba(0, 0, 0, 0.75);
border-width: 20px;
margin-top: -20px;
}
.arrow_box:before {
border-color: rgba(0, 255, 0, 0);
border-right-color: rgba(0, 0, 0, 0.75);
border-width: 20px;
margin-top: -20px;
}
You can obtain an arrow box as a label.
Check the fiddle updated: http://jsfiddle.net/beaver71/eenjkv5c/

Vaadin Upload Button, CSS to change its color (same styles as Button)?

Vaadin 7.6.2
What would be the CSS that would allow me to change the upload button's color to one of the following: danger, primary or friendly so that I may use setStyleName() in the same way as I do for a Button ?
Ref:
https://vaadin.com/docs/-/part/framework/components/components-button.html
This Doc doesn't discuss the bug or fix:
https://vaadin.com/docs/-/part/framework/components/components-upload.html
But does say:
The upload button has the same structure and style as a regular Button component.
So, I guess that the SCSS or CSS that isn't included for this "button" is either an omission, oversight, or bug.
Solved it by finding "danger", "primary" and "friendly" in the source and simply copying them out, pasting them into mytheme.scss then changing the style names as #AndreSchild describes in the following answer:
Vaadin Upload Component Upload Button, changing it's Style?
Here's the updated CSS (paste into mytheme.scss) and use setStyleName as you would for a regular button component:
.v-upload-primary .v-button {
height: 37px;
padding: 0 16px;
color: #ecf2f8;
font-weight: 400;
border-radius: 4px;
border: 1px solid #1362b1;
border-top-color: #156ab3;
border-bottom-color: #1156a8;
background-color: #197de1;
background-image: -webkit-linear-gradient(top, #1b87e3 2%, #166ed5 98%);
background-image: linear-gradient(to bottom,#1b87e3 2%, #166ed5 98%);
-webkit-box-shadow: inset 0 1px 0 #4d98e6, inset 0 -1px 0 #166bca, 0 2px 3px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 #4d98e6, inset 0 -1px 0 #166bca, 0 2px 3px rgba(0, 0, 0, 0.05);
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05);
padding: 0 19px;
font-weight: bold;
min-width: 81px;
}
.v-upload-primary .v-button:after {
border: inherit;
top: -1px;
right: -1px;
bottom: -1px;
left: -1px;
}
.v-upload-primary .v-button:hover:after {
background-color: rgba(90, 163, 237, 0.1);
}
.v-upload-primary .v-button:focus:after {
border: inherit;
-webkit-box-shadow: 0 0 0 2px rgba(25, 125, 225, 0.5);
box-shadow: 0 0 0 2px rgba(25, 125, 225, 0.5);
}
.v-upload-primary .v-button:active:after {
background-color: rgba(2, 62, 122, 0.2);
}
.v-ie8 .v-upload-primary .v-button {
min-width: 43px;
}
.v-upload-friendly .v-button {
height: 37px;
padding: 0 16px;
color: #eaf4e9;
font-weight: 400;
border-radius: 4px;
border: 1px solid #227719;
border-top-color: #257d1a;
border-bottom-color: #1e6b15;
background-color: #2c9720;
background-image: -webkit-linear-gradient(top, #2f9f22 2%, #26881b 98%);
background-image: linear-gradient(to bottom,#2f9f22 2%, #26881b 98%);
-webkit-box-shadow: inset 0 1px 0 #46b33a, inset 0 -1px 0 #26811b, 0 2px 3px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 #46b33a, inset 0 -1px 0 #26811b, 0 2px 3px rgba(0, 0, 0, 0.05);
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05);
}
.v-upload-friendly .v-button:after {
border: inherit;
top: -1px;
right: -1px;
bottom: -1px;
left: -1px;
}
.v-upload-friendly .v-button:hover:after {
background-color: rgba(65, 211, 48, 0.1);
}
.v-upload-friendly .v-button:focus:after {
border: inherit;
-webkit-box-shadow: 0 0 0 2px rgba(25, 125, 225, 0.5);
box-shadow: 0 0 0 2px rgba(25, 125, 225, 0.5);
}
.v-upload-friendly .v-button:active:after {
background-color: rgba(14, 86, 6, 0.2);
}
.v-upload-danger .v-button {
height: 37px;
padding: 0 16px;
color: #f9f0ef;
font-weight: 400;
border-radius: 4px;
border: 1px solid #bb382e;
border-top-color: #bc3c31;
border-bottom-color: #b13028;
background-color: #ed473b;
background-image: -webkit-linear-gradient(top, #ee4c3f 2%, #e13e33 98%);
background-image: linear-gradient(to bottom,#ee4c3f 2%, #e13e33 98%);
-webkit-box-shadow: inset 0 1px 0 #ef786f, inset 0 -1px 0 #da3c31, 0 2px 3px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 #ef786f, inset 0 -1px 0 #da3c31, 0 2px 3px rgba(0, 0, 0, 0.05);
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05);
}
.v-upload-danger .v-button:after {
border: inherit;
top: -1px;
right: -1px;
bottom: -1px;
left: -1px;
}
.v-upload-danger .v-button:hover:after {
background-color: rgba(243, 137, 129, 0.1);
}
.v-upload-danger .v-button:focus:after {
border: inherit;
-webkit-box-shadow: 0 0 0 2px rgba(25, 125, 225, 0.5);
box-shadow: 0 0 0 2px rgba(25, 125, 225, 0.5);
}
.v-upload-danger .v-button:active:after {
background-color: rgba(146, 12, 2, 0.2);
}
An alternative solution is to hide the upload button inside the component by using css. And then add a standard Vaadin button in your code next to the Upload component. Just call upload.submit() inside the click listener of your button.
Now it's easy to apply those standard style names to that button.

Resources