Move to namespace specific svg annotations #1
@@ -61,13 +61,16 @@ class AnnotationHandler extends CodeContentHandler {
|
||||
}
|
||||
|
||||
protected function fillParserOutput( Content $content, ContentParseParams $cpoParams, ParserOutput &$output ) {
|
||||
parent::fillParserOutput( $content, $cpoParams, $output );
|
||||
self::console_log('Parsing the fucking thing', true);
|
||||
|
||||
$metadata = toml_decode($content->getNativeData(), true);
|
||||
self::console_log(var_dump($metadata), true);
|
||||
$metadata = toml_decode($content->getText(), true);
|
||||
self::console_log(print_r($metadata, true), true);
|
||||
|
||||
if (isset($metadata['baseImage'])) {
|
||||
$baseImage = MediaWikiServices::getInstance()->getRepoGroup()->findFile('File:' . $metadata['baseImage']);
|
||||
$imageTitle = Title::makeTitleSafe( NS_FILE, $metadata['baseImage'] );
|
||||
$baseImage = MediaWikiServices::getInstance()->getRepoGroup()->findFile($imageTitle);
|
||||
self::console_log($baseImage->getFullUrl(), true);
|
||||
} else {
|
||||
$baseImage = false;
|
||||
}
|
||||
@@ -82,11 +85,10 @@ class AnnotationHandler extends CodeContentHandler {
|
||||
* and produces the html string for the svg with base image and annotations.
|
||||
*
|
||||
* @param string $metadata The metadata object parsed from the text
|
||||
* @param string $baseImage The full url pointing to the base image to annotate
|
||||
* @param File $baseImage The full url pointing to the base image to annotate
|
||||
* @return string Html string of the complete svg
|
||||
*/
|
||||
private function buildSvg($metadata, $baseImage) {
|
||||
self::console_log(var_dump($baseImage), true);
|
||||
//Gather basic data
|
||||
$elBaseImg = '';
|
||||
$vbHeight = 100;
|
||||
|
||||
Reference in New Issue
Block a user