The Trunk: Collections-mt.888.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-mt.888.mcz

commits-2
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.888.mcz

==================== Summary ====================

Name: Collections-mt.888
Author: mt
Time: 20 April 2020, 10:16:10.896894 am
UUID: ecc786d1-496b-0e4d-8f51-3abcff1823db
Ancestors: Collections-mt.887

Fixes mistake in previous commit. Sorry, it's Monday. --- Complements CollectionsTests-mt.337, which found the mistake.

=============== Diff against Collections-mt.887 ===============

Item was changed:
  ----- Method: HtmlReadWriter>>mapImgTag: (in category 'mapping') -----
  mapImgTag: aTag
 
+ | result startIndex stopIndex attribute src form scaleFactor |
- | result startIndex stopIndex attribute src form |
  result := OrderedCollection new.
 
  "<img src=""https://squeak.org/img/downloads/image.png"">"
  attribute := 'src'.
  startIndex := aTag findString: attribute.
  startIndex > 0 ifTrue: [
  startIndex := aTag findString: '"' startingAt: startIndex+attribute size.
  startIndex > 0
  ifTrue: [stopIndex := aTag findString: '"' startingAt: startIndex+1]
  ifFalse: [
  "URLs without quotes..."
  startIndex := aTag findString: '=' startingAt: startIndex+attribute size.
  stopIndex := aTag findString: '>' startingAt: startIndex+1].
  src := aTag copyFrom: startIndex+1 to: stopIndex-1.
  form := (self httpGetImage: src) ifNil: [(Form dotOfSize: 12 color: Color veryLightGray)].
+ (scaleFactor := RealEstateAgent scaleFactor) = 1.0
+ ifFalse: [form := form scaledToSize: form extent * scaleFactor].
  result
+ add: form asTextAnchor;
- add: form scaleIconToDisplay asTextAnchor;
  add: (TextColor color: Color transparent)].
  ^ result!