-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Nieuw symbool magneetcontact in Schakelaars
# Nieuw symbool Luidspreker in Media
- Loading branch information
Showing
12 changed files
with
339 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
var CONF_builddate="20240115-215745" | ||
var CONF_builddate="20240129-213201" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
class Media extends Electro_Item { | ||
|
||
convertLegacyKeys(mykeys: Array<[string,string,any]>) { | ||
//Nothing to do since Media did not exist when Legacy Keys where still a thing | ||
} | ||
|
||
resetProps() { | ||
this.clearProps(); | ||
this.props.type = "Media"; | ||
this.props.adres = ""; | ||
this.props.aantal = 1; | ||
this.props.symbool = ""; | ||
} | ||
|
||
overrideKeys() { | ||
if (this.props.symbool == 'luidspreker') { | ||
if (this.props.aantal < 1) this.props.aantal = 1; | ||
if (this.props.aantal > 20) this.props.aantal = 20; | ||
} else { | ||
this.props.aantal = 1; | ||
} | ||
} | ||
|
||
toHTML(mode: string) { | ||
this.overrideKeys(); | ||
let output = this.toHTMLHeader(mode); | ||
|
||
output += " Nr: " + this.stringPropToHTML('nr',5) | ||
+ ", Symbool: " + this.selectPropToHTML('symbool',["","luidspreker"]); | ||
|
||
if (this.props.symbool == 'luidspreker') { | ||
output += ", Aantal: " + this.selectPropToHTML('aantal',["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"]); | ||
} | ||
|
||
output += ", Adres/tekst: " + this.stringPropToHTML('adres',5); | ||
|
||
return(output); | ||
} | ||
|
||
toSVG() { | ||
let mySVG:SVGelement = new SVGelement(); | ||
|
||
// Alles naar beneden schuiven als we het aantal laders boven het symbool willen plaatsen | ||
var shifty = 0; | ||
if (this.props.aantal>1) { | ||
shifty = 15; | ||
mySVG.data += '<text x="31" y="12" style="text-anchor:middle" font-family="Arial, Helvetica, sans-serif" font-size="10">x' + htmlspecialchars(this.props.aantal) + '</text>' | ||
} | ||
|
||
mySVG.xleft = 1; // foresee at least some space for the conductor | ||
mySVG.xright = 59; | ||
mySVG.yup = 25 + shifty; | ||
mySVG.ydown = 25; | ||
|
||
switch (this.props.symbool) { | ||
case "luidspreker": | ||
mySVG.data += '<line x1="1" y1="' + (25 + shifty) + '" x2="21" y2="' + (25 + shifty) + '" stroke="black"></line>' | ||
+ '<use xlink:href="#luidspreker" x="21" y="' + (25 + shifty) + '"></use>'; | ||
mySVG.xright = 36; | ||
mySVG.data += this.addAddressToSVG(mySVG,60 + shifty,15,0); | ||
break; | ||
default: | ||
mySVG.data += '<line x1="1" y1="25" x2="21" y2="25" stroke="black"></line>'; | ||
mySVG.xright = 19; | ||
break; | ||
} | ||
|
||
return(mySVG); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.