Browse Source

correctif php7

Idleman 6 years ago
parent
commit
358f01feb5
2 changed files with 7 additions and 2 deletions
  1. 1 1
      class/Plugin.class.php
  2. 6 1
      plugin/fritzing/Fritzing.class.php

+ 1 - 1
class/Plugin.class.php

@@ -70,7 +70,7 @@ class Plugin{
 		$plugin = new self();
 		$manifest = json_decode(file_get_contents($file),true);
 		if(!$manifest) return $plugin;
-		if(!isset($manifest['id']) || !isset($manifest['name']) ) continue;
+		if(!isset($manifest['id']) || !isset($manifest['name']) ) return;
 		$plugin->name = $manifest['name'];
 		$plugin->id = $manifest['id'];
 		$plugin->folder = basename(dirname($file));

+ 6 - 1
plugin/fritzing/Fritzing.class.php

@@ -123,9 +123,14 @@ class Fritzing{
 				$html .= "part.attr('y',".($part['geometry']['y'][0]+$this->minY).");";
 				
 
+				
 				$html .= "part.html('".str_replace(array("'","\n"),array("\'"," "),$part['component']['breadboard'])."');";
 
-				//part.select('g').attr("transform","rotate(45)");
+				if(isset($part['geometry']['r']))
+					$html .= "part.select('g').attr('transform','matrix(".$part['geometry']['r']['m11']." ".$part['geometry']['r']['m12']." ".$part['geometry']['r']['m21']." ".$part['geometry']['r']['m22']." ".$part['geometry']['r']['m31']." ".$part['geometry']['r']['m32'].")');";
+
+
+				
 				 } 
 
 				  foreach ($this->parts as $part) {