Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comBenutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comDieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Riphur« (21. Dezember 2020, 20:34)
ALWAYS, SINCE 2008You are a gentleman and a scholar.
i think you must open a youtube page how to make krpano TUUR |
|
Quellcode |
1 |
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 300"><path d="M968,144.18H99.46a34.87,34.87,0,1,0,0,11.64H968Z" style="fill:#fff;stroke:#231f20;stroke-miterlimit:10"/></svg> |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »nikonutsch« (5. Februar 2023, 15:07)
|
|
Quellcode |
1 |
<hotspot name="mysvg" url="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAwIDMwMCI+PHBhdGggZD0iTTk2OCwxNDQuMThIOTkuNDZhMzQuODcsMzQuODcsMCwxLDAsMCwxMS42NEg5NjhaIiBzdHlsZT0iZmlsbDojZmZmO3N0cm9rZTojMjMxZjIwO3N0cm9rZS1taXRlcmxpbWl0OjEwIi8+PC9zdmc+" ... /> |
Zitat
Do I understand correctly that with this version of the display, svg is converted into a picture
|
|
Quellcode |
1 |
<style name="nav_btn_icons" svg_fill="calc: newskin_settings.nav_icon_color" svg_height="28" svg_width="28" svg_viewBox="0 0 28 28" width="28" height="28" align="center" x="0" y="0" visible="true" enabled="true" capture="false" bgcapture="false" /> |
|
|
Quellcode |
1 |
<layer name="left_nav_home_i" style="nav_btn_icons" url="/plugins/svg.js" svg_title="home8"/> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
function krpanoplugin() {
var local = this; var krpano = null; var plugin = null; var device = null; var svgNode = null;
local.registerplugin = function(krpanointerface, pluginpath, pluginobject) {
krpano = krpanointerface; device = krpano.device; plugin = pluginobject;
plugin.registerattribute('svg_title', null); plugin.registerattribute('svg_fill', null); plugin.registerattribute('svg_stroke', null); plugin.registerattribute('svg_height', null); plugin.registerattribute('svg_preserveAspectRatio', null); plugin.registerattribute('svg_viewBox', null); plugin.registerattribute('svg_width', null); plugin.registerattribute('svg_x', null); plugin.registerattribute('svg_y', null); plugin.registerattribute('svg_tween_time', 0.25); plugin.registerattribute('loadSVG', loadSVG); plugin.registerattribute('changeColor', changeColor);
loadSVG(plugin.svg_title, plugin.svg_fill, plugin.svg_stroke);
};
function loadSVG(svg_title, svg_fill, svg_stroke) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == XMLHttpRequest.DONE) { if (xmlhttp.status == 200) { plugin.sprite.innerHTML = xmlhttp.responseText; svgNode = plugin.sprite.firstElementChild;
if (svg_fill) { svgNode.style.fill = '#' + svg_fill; }
if (svg_stroke) { svgNode.style.stroke = '#' + svg_stroke; } svgNode.style.transition = 'fill ' + plugin.svg_tween_time + 's linear-in-out';
if (plugin.svg_width != null) { svgNode.setAttribute('width', plugin.svg_width); } ; if (plugin.svg_height != null) { svgNode.setAttribute('height', plugin.svg_height); } ; if (plugin.svg_viewBox != null) { svgNode.setAttribute('viewBox', plugin.svg_viewBox); } ; if (plugin.svg_x != null) { svgNode.setAttribute('x', plugin.svg_x); } ; if (plugin.svg_y != null) { svgNode.setAttribute('y', plugin.svg_y); } ;
} else if (xmlhttp.status == 400) {
krpano.trace(3, 'There was an error 400');
} else {
krpano.trace(3, 'something else other than 200 was returned');
} } };
xmlhttp.open('GET', '/assets/SVG/' + svg_title + '.svg', true); xmlhttp.send();
};
function changeColor(thecolor) { //console.log('change color #' + thecolor); svgNode.style.fill = '#' + thecolor; }
local.unloadplugin = function() { delete plugin.divid;
plugin = null; device = null; krpano = null; };
};
|
|
|
Quellcode |
1 |
<polygon id="cross" points="2,1,3,1,3,2,4,2,4,3,3,3,3,4,2,4,2,3,1,3,1,2,2,2,2,1"></polygon> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<object data="svg/cross.svg" type="image/svg+xml"
id="test" width="100%" height="100%">
</object>
<script>
var a = document.getElementById("test");
a.addEventListener("load",function(){
var svgDoc = a.contentDocument;
console.log(svgDoc);
var id = svgDoc.getElementById("cross");
console.log(id);
}, false);
</script>
|
Any help would be appreciated