plxdcma_iconrendererprotocol 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/js.js +52 -1
  2. package/package.json +1 -1
package/js.js CHANGED
@@ -223,13 +223,64 @@ function newSlideOficons(id){
223
223
  }
224
224
  return id
225
225
  }
226
+ function setIconsFullListOfSection(section,iconset){
227
+ var S=IconSectionsDetails[section]
228
+ S.fulllist=iconset
229
+ }
230
+
231
+ function reloadIconsOfSection(section){
232
+ var S=IconSectionsDetails[section]
233
+ var building=S.building
234
+ var fulllist=S.fulllist
235
+ var parameters=S.parameters
236
+ var interfacingdata={
237
+ parameters:parameters,
238
+ section:section
239
+ }
240
+ var slides=[]
241
+ var n=building.numberOfIconSections(fulllist,interfacingdata)
242
+ for(var i = 0 ; i < n;i++){
243
+ slides.push(building.containerHtml(interfacingdata))
244
+ }
245
+ for(var each in fulllist){
246
+ var icon=fulllist[each]
247
+ var h=building.htmlForIcon(icon,interfacingdata)
248
+ if(h == null){
249
+ continue
250
+ }
251
+ if(typeof(h) == "string"){
252
+ var dx=document.createElement(`div`)
253
+ dx.innerHTML=h
254
+ h=dx.children[0]
255
+ }
256
+ var s=building.slideForIcon(icon,interfacingdata)
257
+ h.originalIcon=icon
258
+ ALLRENDEREDICONS.push(h)
259
+ slides[s].appendChild(h)
260
+ }
261
+ IconSectionsDetails[section].slides=slides
262
+ var targetHtml=IconSectionsDetails[section].html
263
+ targetHtml.innerHTML=""
264
+ var x=false
265
+ for(var each in slides){
266
+ var sx=slides[each]
267
+ if(x == true){
268
+ sx.style.display='none'
269
+ }
270
+ if(x == false){
271
+ x=true
272
+ }
273
+ targetHtml.appendChild(sx)
274
+ }
275
+ }
226
276
  function renderIcons(id,fulllist,parameters,building,targetHtml){
227
277
  var section=id
228
278
  IconSectionsDetails[id]={
229
279
  html:targetHtml,
230
280
  parameters:parameters,
231
281
  slides:[],
232
- building:building
282
+ building:building,
283
+ fulllist:fulllist
233
284
  }
234
285
  var interfacingdata={
235
286
  parameters:parameters,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plxdcma_iconrendererprotocol",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "main": "init.js",
5
5
  "license": "MIT"
6
6
  }